1234567891011121314151617 |
- 'use strict';
- /**
- * @param {Egg.Application} app - egg application
- */
- module.exports = app => {
- const { router, controller } = app;
- router.get('/', controller.home.index);
- // 栏目表设置路由
- router.resources('column', '/api/serve/column', controller.column); // index、create、show、destroy
- router.post('column', '/api/serve/column/update/:id', controller.column.update);
- // 信息表设置路由
- router.resources('news', '/api/serve/news', controller.news); // index、create、show、destroy
- router.post('news', '/api/serve/news/update/:id', controller.news.update);
- };
|