/** * REST API,以端点的形式提供。 * * 若想访问包含页面的内容,请在相应的API后面添加.html。 */ const APIv1 = { Application: { Base: '/api/v1/application', BadgeNo: '/badge_no' }, Chats: { Base: "/api/v1/chats", List: "/list", ListWithPatient: "/list/patient", ListWithDoctor: "/list/doctor", MsgAmount:"/msg/amount", Recent: '/recent', SearchAboutPatient: '/search/patient', SearchAboutPatientList:'/search/patient/list', SearchAbountPatientMore:'/search/patient/all', SearchAboutDoctor: '/search/doctor', SearchAboutDoctorList: '/search/doctor/list', SearchAbountDoctorContentDetail:'/search/doctor/content/list', // 所有未读消息数 UnreadMsgCount: '/unread_count', Message: '/message', // 单条消息 // 私信 PM: '/pm', PMUnread: '/pm/unread', PMUnreadCount: '/pm/unread/count', PMStats: '/pm/statistic', PMFinished: '/pm/finished', // 当前会话是否已经结束 // 组信 GM: '/gm', GMUnread: '/gm/unread', GMUnreadCount: '/gm/unread/count', GMStats: '/gm/statistic', //系统消息 SM: '/sm', TEST:'/test' }, Users: { Base: '/api/v1/users', Login: '/login', Logout: '/logout', User: '/:user_id', UserStatus: '/:user_id/status' }, Groups: { Base: '/api/v1/groups', Members: '/:group_id/members', MembersAvatar: '/member/avatars' }, Management: { Base: '/api/v1/management', Health: '/health', DbStatus: '/db' }, Push: { Base: '/api/v1/push', Getui: '/getui' }, Topics:{ Base:'/api/v1/topic',//基础连接 StartTopic:"/start", EndTopic:"/end", Topics:"/list" }, Sessions:{ Base:'/api/v1/session',//基础连接 SessionList:'/sessions', //获取会话列表 MessageList:'/messages', //获取消息列表 SendMsg:'/send', //发送消息 CreateSession:'/create',//创建会话 StickSession:'/stick', //会话置顶 UnStickSession:'/cancelStick',//取消置顶 PushSessionUser:'/push',//往Session里面push人员 RemoveSessionUser:'/remove'//将人员从session中移除 } }; const pages = { Home: { Index: '/' }, Socket: { Index: '/socket', Test: '/test' } }; module.exports.PAGES = pages; module.exports.APIv1 = APIv1;