1234567891011121314151617181920212223242526272829303132 |
- 'use strict';
- /**
- * @param {Egg.Application} app - egg application
- */
- module.exports = app => {
- const { router, controller } = app;
- router.get('/', controller.home.index);
- router.all('/demo', controller.home.demo);
- // 开放接口
- router.get('/naf/xzqh/list', controller.api.xzqh);
- router.get('/naf/category/:category/list', controller.api.list);
- router.get('/naf/category/:category/:group/list', controller.api.list);
- router.get('/naf/category/:category/fetch', controller.api.fetch);
- router.get('/naf/category/:category/:group/fetch', controller.api.fetch);
- // 字典分类
- router.get('/naf/category/list', controller.category.list);
- router.get('/naf/category/fetch', controller.category.fetch);
- router.post('/naf/category/create', controller.category.create);
- router.post('/naf/category/update', controller.category.update);
- router.get('/naf/category/delete', controller.category.delete);
- // 字典项
- router.get('/naf/items/:category/list', controller.items.list);
- router.get('/naf/items/:category/fetch', controller.items.fetch);
- router.post('/naf/items/:category/create', controller.items.create);
- router.post('/naf/items/:category/update', controller.items.update);
- router.get('/naf/items/:category/delete', controller.items.delete);
- router.get('/naf/items/:category/clear', controller.items.clear);
- };
|