123456789101112131415161718192021222324252627282930313233343536 |
- 'use strict';
- /**
- * @param {Egg.Application} app - egg application
- */
- module.exports = app => {
- const { router, controller } = app;
- // 用户
- router.post('/api/naf/adminUser/create', controller.adminUser.create);
- router.post('/api/naf/adminUser/update', controller.adminUser.update);
- router.delete('/api/naf/adminUser/delete/:id', controller.adminUser.delete);
- router.get('/api/naf/adminUser/query', controller.adminUser.query);
- router.post('/api/naf/adminUser/updatePwd', controller.adminUser.updatePwd);
- // 角色
- router.post('/api/naf/role/create', controller.role.create);
- router.post('/api/naf/role/update', controller.role.update);
- router.delete('/api/naf/role/delete/:id', controller.role.delete);
- router.get('/api/naf/role/query', controller.role.query);
- // 菜单
- router.get('/api/naf/adminMenu/queryUserMenu', controller.adminMenu.queryUserMenu);
- router.get('/api/naf/adminMenu/query', controller.adminMenu.query);
- // 用户角色
- router.post('/api/naf/userBindRole/bind', controller.userBindRole.bind);
- router.post('/api/naf/userBindRole/unbind', controller.userBindRole.unbind);
- router.get('/api/naf/userBindRole/queryBind', controller.userBindRole.queryBind);
- router.get('/api/naf/userBindRole/queryRole', controller.userBindRole.queryRole);
- router.post('/api/naf/userBindRole/batchBind', controller.userBindRole.batchBind);
- router.post('/api/naf/userBindRole/batchUnBind', controller.userBindRole.batchUnBind);
- // 角色菜单
- router.post('/api/naf/roleBindMenu/bind', controller.roleBindMenu.bind);
- router.post('/api/naf/roleBindMenu/unbind', controller.roleBindMenu.unbind);
- router.get('/api/naf/roleBindMenu/queryBind', controller.roleBindMenu.queryBind);
- router.get('/api/naf/roleBindMenu/queryMenu', controller.roleBindMenu.queryMenu);
- router.post('/api/naf/roleBindMenu/batchBind', controller.roleBindMenu.batchBind);
- router.post('/api/naf/roleBindMenu/batchUnBind', controller.roleBindMenu.batchUnBind);
- };
|