search-time-list.ts 898 B

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. // const oneDay = 24 * 60 * 60 * 1000;
  2. const oneDay = 24 * 60 * 60;
  3. export const searchMessageTimeList: {
  4. [propsName: string]: {
  5. key: string;
  6. label: string;
  7. value: { timePosition: number; timePeriod: number };
  8. };
  9. } = {
  10. all: {
  11. key: 'all',
  12. label: '全部',
  13. value: {
  14. timePosition: 0,
  15. timePeriod: 0,
  16. },
  17. },
  18. oneDay: {
  19. key: 'today',
  20. label: '今天',
  21. value: {
  22. timePosition: 0,
  23. timePeriod: oneDay,
  24. },
  25. },
  26. threeDay: {
  27. key: 'threeDays',
  28. label: '近三天',
  29. value: {
  30. timePosition: 0,
  31. timePeriod: 3 * oneDay,
  32. },
  33. },
  34. sevenDay: {
  35. key: 'sevenDays',
  36. label: '近七天',
  37. value: {
  38. timePosition: 0,
  39. timePeriod: 7 * oneDay,
  40. },
  41. },
  42. };
  43. export const searchMessageTimeKeys = Object.keys(searchMessageTimeList);
  44. export const searchMessageTimeDefault = searchMessageTimeList['all'];