'use strict'; /** * @param {Egg.Application} app - egg application */ module.exports = app => { const prefix = '/api/servicezhwl'; const index = 'system'; const { router, controller } = app; // xzqh行政区划 router.get(`${prefix}/dictionary/xzqh`, controller[index].dictionary.xzqh); router.get(`${prefix}/dictionary/tree`, controller[index].dictionary.tree); router.resources('dictionary', `${prefix}/dictionary`, controller[index].dictionary); // index、create、show、destroy router.post('dictionary', `${prefix}/dictionary/update/:id`, controller[index].dictionary.update); // 定时任务 router.get('schedule', `${prefix}/schedule/check`, controller[index].schedule.check); router.resources('schedule', `${prefix}/schedule`, controller[index].schedule); // index、create、show、destroy router.post('schedule', `${prefix}/schedule/update/:id`, controller[index].schedule.update); // 通知 router.resources('notice', `${prefix}/notice`, controller[index].notice); // index、create、show、destroy router.post('notice', `${prefix}/notice/update/:id`, controller[index].notice.update); };