2
0

notices.ts 3.4 KB

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