router.js 836 B

12345678910111213141516171819202122
  1. 'use strict';
  2. /**
  3. * @param {Egg.Application} app - egg application
  4. */
  5. module.exports = app => {
  6. const { router, controller } = app;
  7. router.get('/', controller.home.index);
  8. router.post('/api/position/util', controller.home.util);
  9. // 定位
  10. router.post('/api/position', controller.position.create);
  11. router.get('/api/position', controller.position.index);
  12. router.get('/api/position/map', controller.position.map);
  13. router.get('/api/position/:id', controller.position.show);
  14. router.delete('/api/position/:id', controller.position.destroy);
  15. // 定位工牌
  16. // router.post('/api/position/card', controller.card.create);
  17. router.get('/api/position/card', controller.card.index);
  18. // router.get('/api/position/card/loop', controller.card.loop);
  19. // router.post('/api/position/card/login', controller.card.login);
  20. };