router.js 582 B

1234567891011121314
  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('carorder', '/api/servicetest/carorder', controller.carorder); // index、create、show、destroy
  9. router.post('carorder', '/api/servicetest/carorder/update/:id', controller.carorder.update);
  10. // 维修表
  11. router.resources('repair', '/api/servicetest/repair', controller.repair); // index、create、show、destroy
  12. router.post('repair', '/api/servicetest/repair/update/:id', controller.repair.update);
  13. };