'use strict'; /** * @param {Egg.Application} app - egg application */ module.exports = app => { const { router, controller } = app; router.get('/', controller.home.index); router.post('/api/position/util', controller.home.util); // 定位 router.post('/api/position', controller.position.create); router.get('/api/position', controller.position.index); router.get('/api/position/map', controller.position.map); router.get('/api/position/:id', controller.position.show); router.delete('/api/position/:id', controller.position.destroy); // 定位工牌 // router.post('/api/position/card', controller.card.create); router.get('/api/position/card', controller.card.index); // router.get('/api/position/card/loop', controller.card.loop); // router.post('/api/position/card/login', controller.card.login); };