notices.ts 3.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115
  1. import { Request, Response } from 'express';
  2. const getNotices = (req: Request, res: Response) => {
  3. res.json({
  4. data: [
  5. {
  6. id: '000000001',
  7. avatar:
  8. 'https://mdn.alipayobjects.com/yuyan_qk0oxh/afts/img/MSbDR4FR2MUAAAAAAAAAAAAAFl94AQBr',
  9. title: '你收到了 14 份新周报',
  10. datetime: '2017-08-09',
  11. type: 'notification',
  12. },
  13. {
  14. id: '000000002',
  15. avatar:
  16. 'https://mdn.alipayobjects.com/yuyan_qk0oxh/afts/img/hX-PTavYIq4AAAAAAAAAAAAAFl94AQBr',
  17. title: '你推荐的 曲妮妮 已通过第三轮面试',
  18. datetime: '2017-08-08',
  19. type: 'notification',
  20. },
  21. {
  22. id: '000000003',
  23. avatar:
  24. 'https://mdn.alipayobjects.com/yuyan_qk0oxh/afts/img/jHX5R5l3QjQAAAAAAAAAAAAAFl94AQBr',
  25. title: '这种模板可以区分多种通知类型',
  26. datetime: '2017-08-07',
  27. read: true,
  28. type: 'notification',
  29. },
  30. {
  31. id: '000000004',
  32. avatar:
  33. 'https://mdn.alipayobjects.com/yuyan_qk0oxh/afts/img/Wr4mQqx6jfwAAAAAAAAAAAAAFl94AQBr',
  34. title: '左侧图标用于区分不同的类型',
  35. datetime: '2017-08-07',
  36. type: 'notification',
  37. },
  38. {
  39. id: '000000005',
  40. avatar:
  41. 'https://mdn.alipayobjects.com/yuyan_qk0oxh/afts/img/Mzj_TbcWUj4AAAAAAAAAAAAAFl94AQBr',
  42. title: '内容不要超过两行字,超出时自动截断',
  43. datetime: '2017-08-07',
  44. type: 'notification',
  45. },
  46. {
  47. id: '000000006',
  48. avatar:
  49. 'https://mdn.alipayobjects.com/yuyan_qk0oxh/afts/img/eXLzRbPqQE4AAAAAAAAAAAAAFl94AQBr',
  50. title: '曲丽丽 评论了你',
  51. description: '描述信息描述信息描述信息',
  52. datetime: '2017-08-07',
  53. type: 'message',
  54. clickClose: true,
  55. },
  56. {
  57. id: '000000007',
  58. avatar:
  59. 'https://mdn.alipayobjects.com/yuyan_qk0oxh/afts/img/w5mRQY2AmEEAAAAAAAAAAAAAFl94AQBr',
  60. title: '朱偏右 回复了你',
  61. description: '这种模板用于提醒谁与你发生了互动,左侧放『谁』的头像',
  62. datetime: '2017-08-07',
  63. type: 'message',
  64. clickClose: true,
  65. },
  66. {
  67. id: '000000008',
  68. avatar:
  69. 'https://mdn.alipayobjects.com/yuyan_qk0oxh/afts/img/wPadR5M9918AAAAAAAAAAAAAFl94AQBr',
  70. title: '标题',
  71. description: '这种模板用于提醒谁与你发生了互动,左侧放『谁』的头像',
  72. datetime: '2017-08-07',
  73. type: 'message',
  74. clickClose: true,
  75. },
  76. {
  77. id: '000000009',
  78. title: '任务名称',
  79. description: '任务需要在 2017-01-12 20:00 前启动',
  80. extra: '未开始',
  81. status: 'todo',
  82. type: 'event',
  83. },
  84. {
  85. id: '000000010',
  86. title: '第三方紧急代码变更',
  87. description: '冠霖提交于 2017-01-06,需在 2017-01-07 前完成代码变更任务',
  88. extra: '马上到期',
  89. status: 'urgent',
  90. type: 'event',
  91. },
  92. {
  93. id: '000000011',
  94. title: '信息安全考试',
  95. description: '指派竹尔于 2017-01-09 前完成更新并发布',
  96. extra: '已耗时 8 天',
  97. status: 'doing',
  98. type: 'event',
  99. },
  100. {
  101. id: '000000012',
  102. title: 'ABCD 版本发布',
  103. description: '冠霖提交于 2017-01-06,需在 2017-01-07 前完成代码变更任务',
  104. extra: '进行中',
  105. status: 'processing',
  106. type: 'event',
  107. },
  108. ],
  109. });
  110. };
  111. export default {
  112. 'GET /api/notices': getNotices,
  113. };