order.js 599 B

1234567891011121314151617
  1. 'use strict';
  2. // 路由配置
  3. const path = require('path');
  4. const regPath = path.resolve('app', 'public', 'routerRegister');
  5. const routerRegister = require(regPath);
  6. const rkey = 'viewOrder';
  7. const ckey = 'view.order';
  8. const keyZh = '订单相关视图';
  9. const routes = [
  10. { method: 'get', path: `${rkey}`, controller: `${ckey}.allOrder`, name: `${ckey}allOrder`, zh: '全部订单' },
  11. { method: 'get', path: `${rkey}/getOrder/:id`, controller: `${ckey}.getOrder`, name: `${ckey}getOrder`, zh: '订单查询' },
  12. ];
  13. module.exports = app => {
  14. routerRegister(app, routes, keyZh, rkey, ckey);
  15. };