123456789101112131415161718192021222324252627282930313233343536373839404142 |
- 'use strict';
- /**
- * @param {Egg.Application} app - egg application
- */
- module.exports = app => {
- const { router, controller } = app;
- // 信息表设置路由
- router.resources('news', '/api/count/news', controller.news); // index、create、show、destroy
- router.post('news', '/api/count/news/update/:id', controller.news.update);
- // 权限表设置路由
- router.resources('roles', '/api/count/roles', controller.roles); // index、create、show、destroy
- router.post('roles', '/api/count/roles/update/:id', controller.roles.update);
- // 用户表设置路由
- router.resources('user', '/api/count/user', controller.user); // index、create、show、destroy
- router.post('user', '/api/count/user/update/:id', controller.user.update);
- router.post('user', '/api/count/user/uppasswd', controller.user.uppasswd);
- router.post('user', '/api/count/user/login', controller.user.login);
- // 职务表设置路由
- router.resources('level', '/api/count/level', controller.level); // index、create、show、destroy
- router.post('level', '/api/count/level/update/:id', controller.level.update);
- // 部门表设置路由
- router.resources('department', '/api/count/department', controller.department); // index、create、show、destroy
- router.post('department', '/api/count/department/update/:id', controller.department.update);
- // 人员表设置路由
- router.resources('staff', '/api/count/staff', controller.staff); // index、create、show、destroy
- router.post('staff', '/api/count/staff/update/:id', controller.staff.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('expert', '/api/live/expert', controller.expert); // index、create、show、destroy
- router.post('expert', '/api/live/expert/update/:id', controller.expert.update);
- };
|