router.js 863 B

1234567891011121314151617181920212223
  1. 'use strict';
  2. /**
  3. * @param {Egg.Application} app - egg application
  4. */
  5. module.exports = app => {
  6. const { router, controller } = app;
  7. // 測試
  8. router.resources('test', '/api/servicezhwl/test', controller.test); // index、create、show、destroy
  9. router.post('test', '/api/servicezhwl/test/update/:id', controller.test.update);
  10. // 司机表
  11. router.resources('zhwldriver', '/api/servicezhwl/zhwldriver', controller.zhwldriver); // index、create、show、destroy
  12. router.post('zhwldriver', '/api/servicezhwl/zhwldriver/update/:id', controller.zhwldriver.update);
  13. // 车辆表
  14. router.resources('zhwlcar', '/api/servicezhwl/zhwlcar', controller.zhwlcar); // index、create、show、destroy
  15. router.post('zhwlcar', '/api/servicezhwl/zhwlcar/update/:id', controller.zhwlcar.update);
  16. // 系统设置路由
  17. require('./router/system')(app);
  18. };