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