orderDetail.js 1.1 KB

1234567891011121314151617181920
  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 = 'orderDetail';
  7. const ckey = 'trade.orderDetail';
  8. const keyZh = '订单详情';
  9. const routes = [
  10. { method: 'post', path: `${rkey}/sot`, controller: `${ckey}.sot`, name: `${ckey}sot`, zh: `${keyZh}查询物流` },
  11. { method: 'get', path: `${rkey}`, controller: `${ckey}.index`, middleware: [ 'dealQuery' ], name: `${ckey}Query`, zh: `${keyZh}列表查询` },
  12. { method: 'get', path: `${rkey}/:id`, controller: `${ckey}.show`, name: `${ckey}Show`, zh: `${keyZh}查询` },
  13. // { method: 'post', path: `${rkey}`, controller: `${ckey}.create`, name: `${ckey}Create`, zh: `创建${keyZh}` },
  14. { method: 'post', path: `${rkey}/:id`, controller: `${ckey}.update`, name: `${ckey}Update`, zh: `修改${keyZh}` },
  15. // { method: 'delete', path: `${rkey}/:id`, controller: `${ckey}.destroy`, name: `${ckey}Delete`, zh: `删除${keyZh}` },
  16. ];
  17. module.exports = app => {
  18. routerRegister(app, routes, keyZh, rkey, ckey);
  19. };