123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132 |
- 'use strict';
- /**
- * @param {Egg.Application} app - egg application
- */
- module.exports = app => {
- const { router, controller } = app;
- router.get('/', controller.home.index);
- // 礼物表设置路由
- router.resources('present', '/api/live/present', controller.present); // index、create、show、destroy
- router.post('present', '/api/live/present/:id', controller.present.update);
- // 礼物表设置路由
- router.resources(
- 'presentrcord',
- '/api/live/presentrcord',
- controller.presentrcord
- ); // index、create、show、destroy
- router.post(
- 'presentrcord',
- '/api/live/presentrcord/:id',
- controller.presentrcord.update
- );
- // 房间表设置路由
- router.resources('room', '/api/live/room', controller.room); // index、create、show、destroy
- router.post('room', '/api/live/room/:id', controller.room.update);
- // 房间表设置路由
- router.resources('roomchat', '/api/live/roomchat', controller.roomchat); // index、create、show、destroy
- router.post('roomchat', '/api/live/roomchat/:id', controller.roomchat.update);
- // 公共聊天设置路由
- router.resources('chat', '/api/live/chat', controller.chat); // index、create、show、destroy
- router.post('chat', '/api/live/chat/:id', controller.chat.update);
- // 对接会表设置路由
- router.get('/api/live/dock/getgoodslist', controller.dock.getgoodslist); // 模糊查询商品列表
- router.get('/api/live/dock/dockopenid', controller.dock.getdockByopenid); // 查询申请的对接列表
- router.get('/api/live/dock/dockfetch/:id', controller.dock.dockfetch); // 查询申请的对接列表
- router.get('/api/live/dock/myapply', controller.dock.myapply); // 查询申请的对接列表
- router.resources('dock', '/api/live/dock', controller.dock); // index、create、show、destroy
- router.post('dock', '/api/live/dock/:id', controller.dock.update);
- // router.post('dock', '/api/live/dock/check/:id', controller.dock.dockCheck);
- // 对接会申请表
- router.post('dock', '/api/live/dock/apply/:id', controller.dock.apply);
- // 申请用户产品列表
- router.post('dock', '/api/live/dock/goods/:id', controller.dock.goods);
- router.post(
- 'dock',
- '/api/live/dock/apply/:dock_id/check/:id',
- controller.dock.check
- );
- router.post('/api/live/dock/updatevipuser/:id', controller.dock.updatevipuser);
- router.post('/api/live/dock/createvipuser/:id', controller.dock.createvipuser);
- router.delete('/api/live/dock/deletevipuser/:id', controller.dock.vipdelete); // id 为vip的uid
- router.post('/api/live/dock/getdock/:id', controller.dock.getdock);
- router.post('/api/live/getapply', controller.dock.getapply);
- // 用户登录
- router.post('/api/live/login', controller.login.login);
- // 根据token取得用户信息
- router.post('/api/live/token', controller.login.token);
- // 用户退出登录
- router.post('/api/live/logout', controller.login.destroy);
- // 栏目表设置路由
- router.resources('column', '/api/live/column', controller.column); // index、create、show、destroy
- router.post('column', '/api/live/column/update/:id', controller.column.update
- );
- // 信息表设置路由
- router.resources('news', '/api/live/news', controller.news); // index、create、show、destroy
- router.post('news', '/api/live/news/update/:id', controller.news.update);
- // 在线指导信息表设置路由
- router.resources('newsguidance', '/api/live/newsguidance', controller.newsguidance); // index、create、show、destroy
- router.post('newsguidance', '/api/live/newsguidance/update/:id', controller.newsguidance.update);
- // 项目路演表设置路由
- router.resources('newsroadshow', '/api/live/newsroadshow', controller.newsroadshow); // index、create、show、destroy
- router.post('newsroadshow', '/api/live/newsroadshow/update/:id', controller.newsroadshow.update);
- // 信息表设置路由
- router.resources('comment', '/api/live/comment', controller.comment); // index、create、show、destroy
- router.post('comment', '/api/live/comment/update/:id', controller.comment.update);
- // 私人聊天室表设置路由
- router.resources('personroom', '/api/live/personroom', controller.personroom); // index、create、show、destroy
- router.post('personroom', '/api/live/personroom/update/:id', controller.personroom.update);
- // 私人聊天记录表设置路由
- router.resources('personchat', '/api/live/personchat', controller.personchat); // index、create、show、destroy
- router.post('personchat', '/api/live/personchat/update/:id', controller.personchat.update);
- router.post('personchat', '/api/live/personchat/received', controller.personchat.received); // 将消息设置成已读
- router.delete('/api/live/personroomtalk/:id', controller.personroomtalk.delete);
- router.get('/api/live/personroomtalk/countroom', controller.personroomtalk.countroom);
- // 科技在线频道
- router.resources('channel', '/api/live/channel', controller.channel); // index、create、show、destroy
- router.post('channel', '/api/live/channel/update/:id', controller.channel.update);
- router.post('channel', '/api/live/channel/login', controller.channel.login);
- // 科技频道录像
- router.resources('channelVideo', '/api/live/channelvideo', controller.channelVideo); // index、create、show、destroy
- router.post('channelVideo', '/api/live/channelvideo/update/:id', controller.channelVideo.update);
- // 花表
- router.resources('flower', '/api/live/flower', controller.flower); // index、create、show、destroy
- router.post('flower', '/api/live/flower/update/:id', controller.flower.update);
- // 展会信息表
- router.resources('imgtxtdock', '/api/live/imgtxtdock', controller.imgtxtdock); // index、create、show、destroy
- router.post('imgtxtdock', '/api/live/imgtxtdock/update/:id', controller.imgtxtdock.update);
- // 培训问诊表
- router.get('trainlive', '/api/live/trainlive/user/longer/:id', controller.trainlive.userLonger);
- router.post('trainlive', '/api/live/trainlive/login', controller.trainlive.login);
- router.post('trainlive', '/api/live/trainlive/user/login/:id', controller.trainlive.userLogin);
- router.post('trainlive', '/api/live/trainlive/user/logout/:id', controller.trainlive.userLogout);
- router.post('trainlive', '/api/live/trainlive/user/:id', controller.trainlive.addUser);
- router.delete('trainlive', '/api/live/trainlive/user/:id', controller.trainlive.deleteUser);
- router.post('trainlive', '/api/live/trainlive/user/update/:id', controller.trainlive.updateUser);
- router.post('trainlive', '/api/live/trainlive/update/:id', controller.trainlive.update);
- router.get('trainlive', '/api/live/trainlive/user/:id', controller.trainlive.userData);
- router.resources('trainlive', '/api/live/trainlive', controller.trainlive); // index、create、show、destroy
- router.resources('trainchat', '/api/live/trainchat', controller.trainchat); // index、create、show、destroy
- router.post('trainchat', '/api/live/trainchat/update/:id', controller.trainchat.update);
- };
|