notices.js 3.1 KB

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