router.js
1.3 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
/**
* router of sub app service
* @author: xuan.chen@yoho.cn<xuan.chen@yoho.cn>
* @date: 2016/11/21
*/
'use strict';
const router = require('express').Router(); //eslint-disable-line
const cRoot = './controllers';
const chat = require(`${cRoot}/chat`);
const chatQa = require(`${cRoot}/chatQa`); // 问题搜索列表页
const system = require(`${cRoot}/systemUpdate`);
// middlware
const authGuard = require('../../doraemon/middleware/auth');
const disableBFCache = require('../../doraemon/middleware/disable-BFCache');
// Your controller here
router.get('/im', disableBFCache, chat.appAdapter, authGuard, chat.page);
router.get('/im/fetchHistory', chat.fetchHistory);
router.get('/getOrders', chat.getOrders);
router.get('/im/global-list', chat.queryGlobalOrder);
router.get('/im/order-list', chat.fetchOrders);
router.get('/im/queryReasons', chat.queryReasons);
router.post('/leavemsg/save.json', chat.saveMSG);
router.post('/im/saveEvalute', chat.saveEvalute);
router.get('/chatQaList', chatQa.qaList); // 问题搜索列表页
router.get('/qaSearch', chatQa.qaSearch); // 问题搜索页
router.get('/qaDetail', chatQa.qaDetail); // 问题详情页
router.get('/keySearch', chatQa.keySearch); // 问题搜索关键词
router.get('/systemUpdate', system.systemUpdate);// 升级公告
module.exports = router;