endpoints.js 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293
  1. /**
  2. * REST API,以端点的形式提供。
  3. *
  4. * 若想访问包含页面的内容,请在相应的API后面添加.html。
  5. */
  6. const APIv1 = {
  7. Application: {
  8. Base: '/api/v1/application',
  9. BadgeNo: '/badge_no'
  10. },
  11. Chats: {
  12. Base: "/api/v1/chats",
  13. YdfList:"/ydf/list",
  14. List: "/list",
  15. ListWithPatient: "/list/patient",
  16. ListWithDoctor: "/list/doctor",
  17. MsgAmount:"/msg/amount",
  18. Recent: '/recent',
  19. SearchAboutPatient: '/search/patient',
  20. SearchAboutPatientList:'/search/patient/list',
  21. SearchAbountPatientMore:'/search/patient/all',
  22. SearchAboutDoctor: '/search/doctor',
  23. SearchAboutDoctorList: '/search/doctor/list',
  24. SearchAbountDoctorContentDetail:'/search/doctor/content/list',
  25. // 所有未读消息数
  26. UnreadMsgCount: '/unread_count',
  27. Message: '/message', // 单条消息
  28. // 私信
  29. PM: '/pm',
  30. PMUnread: '/pm/unread',
  31. PMUnreadCount: '/pm/unread/count',
  32. PMStats: '/pm/statistic',
  33. PMFinished: '/pm/finished', // 当前会话是否已经结束
  34. // 组信
  35. GM: '/gm',
  36. GMUnread: '/gm/unread',
  37. GMUnreadCount: '/gm/unread/count',
  38. GMStats: '/gm/statistic',
  39. //系统消息
  40. SM: '/sm'
  41. },
  42. Users: {
  43. Base: '/api/v1/users',
  44. Login: '/login',
  45. Logout: '/logout',
  46. User: '/:user_id',
  47. UserStatus: '/:user_id/status'
  48. },
  49. Groups: {
  50. Base: '/api/v1/groups',
  51. Members: '/:group_id/members',
  52. MembersAvatar: '/member/avatars'
  53. },
  54. Management: {
  55. Base: '/api/v1/management',
  56. Health: '/health',
  57. DbStatus: '/db'
  58. },
  59. Push: {
  60. Base: '/api/v1/push',
  61. Getui: '/getui'
  62. }
  63. };
  64. const pages = {
  65. Home: {
  66. Index: '/'
  67. },
  68. Socket: {
  69. Index: '/socket',
  70. Test: '/test'
  71. }
  72. };
  73. module.exports.PAGES = pages;
  74. module.exports.APIv1 = APIv1;