123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778 |
- '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.post('user', '/api/count/user/register', controller.user.register);
- // 职务表设置路由
- 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/count/comment', controller.comment); // index、create、show、destroy
- router.post(
- 'comment',
- '/api/count/comment/update/:id',
- controller.comment.update
- );
- // 专家表设置路由
- router.resources('expert', '/api/count/expert', controller.expert); // index、create、show、destroy
- router.post(
- 'expert',
- '/api/count/expert/update/:id',
- controller.expert.update
- );
- // 需求表设置路由
- router.resources('demand', '/api/count/demand', controller.demand); // index、create、show、destroy
- router.post(
- 'demand',
- '/api/count/demand/update/:id',
- controller.demand.update
- );
- // 需求表设置路由
- router.resources('link', '/api/count/link', controller.link); // index、create、show、destroy
- router.post('link', '/api/count/link/update/:id', controller.link.update);
- // 信息表设置路由
- router.resources('top', '/api/count/top', controller.top); // index、create、show、destroy
- router.post('top', '/api/count/top/update/:id', controller.top.update);
- // 集群节点初始查询
- router.get('/api/count/servenode', controller.qnodes.index);
- router.get('/api/count/util', controller.top.util);
- };
|