1234567891011121314151617181920212223242526272829303132333435363738394041424344454647 |
- 'use strict';
- /**
- * @param {Egg.Application} app - egg application
- */
- module.exports = app => {
- const { router, controller } = app;
- // 栏目
- router.post('/api/cms/column/create', controller.column.create);
- router.post('/api/cms/column/update', controller.column.update);
- router.delete('/api/cms/column/delete/:id', controller.column.delete);
- router.get('/api/cms/column/query', controller.column.query);
- // 内容
- router.post('/api/cms/contents/create', controller.content.create);
- router.post('/api/cms/contents/update', controller.content.update);
- router.delete('/api/cms/contents/delete/:id', controller.content.delete);
- router.get('/api/cms/contents/query', controller.content.query);
- router.get('/api/cms/contents/fetch', controller.content.fetch);
- router.get('/api/cms/contents/search', controller.content.search);
- // 图片新闻类型
- router.post('/api/cms/imgtype/create', controller.imgtype.create);
- router.post('/api/cms/imgtype/update', controller.imgtype.update);
- router.delete('/api/cms/imgtype/delete/:id', controller.imgtype.delete);
- router.get('/api/cms/imgtype/query', controller.imgtype.query);
- // 图片新闻
- router.post('/api/cms/imgnews/create', controller.imgnews.create);
- router.post('/api/cms/imgnews/update', controller.imgnews.update);
- router.delete('/api/cms/imgnews/delete/:id', controller.imgnews.delete);
- router.get('/api/cms/imgnews/query', controller.imgnews.query);
- router.get('/api/cms/imgnews/fetch', controller.imgnews.fetch);
- // 菜单
- router.post('/api/cms/menus/create', controller.menu.create);
- router.post('/api/cms/menus/update', controller.menu.update);
- router.delete('/api/cms/menus/delete/:id', controller.menu.delete);
- router.get('/api/cms/menus/query', controller.menu.query);
- // 单页
- router.post('/api/cms/pages/create', controller.pages.create);
- router.post('/api/cms/pages/update', controller.pages.update);
- router.delete('/api/cms/pages/delete/:id', controller.pages.delete);
- router.get('/api/cms/pages/query', controller.pages.query);
- router.get('/api/cms/pages/fetch', controller.pages.fetch);
- // 配置
- router.post('/api/cms/toconfig/create', controller.toconfig.create);
- router.post('/api/cms/toconfig/update', controller.toconfig.update);
- router.delete('/api/cms/toconfig/delete/:id', controller.toconfig.delete);
- router.get('/api/cms/toconfig/query', controller.toconfig.query);
- };
|