afterSale.js 1.5 KB

1234567891011121314151617181920212223
  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 = 'afterSale';
  7. const ckey = 'trade.afterSale';
  8. const keyZh = '售后';
  9. const routes = [
  10. { method: 'get', path: `${rkey}/canRefund/:id`, controller: `${ckey}.canRefund`, name: `${ckey}canRefund`, zh: `${keyZh}查询是否可以退款退货` },
  11. { method: 'get', path: `${rkey}/getTransportInfo/:id`, controller: `${ckey}.getTransportInfo`, name: `${ckey}getTransportInfo`, zh: `${keyZh}查询售后快递` },
  12. { method: 'post', path: `${rkey}/orderCancel`, controller: `${ckey}.orderCancel`, name: `${ckey}orderCancel`, zh: '取消订单' },
  13. { method: 'post', path: `${rkey}/cgfr`, controller: `${ckey}.cgfr`, name: `${ckey}cgfr`, zh: '查询退货商品的金额设置' },
  14. { method: 'get', path: `${rkey}`, controller: `${ckey}.index`, name: `${ckey}Query`, zh: `${keyZh}列表查询` },
  15. { method: 'get', path: `${rkey}/:id`, controller: `${ckey}.show`, name: `${ckey}Show`, zh: `${keyZh}查询` },
  16. { method: 'post', path: `${rkey}`, controller: `${ckey}.create`, name: `${ckey}Create`, zh: `创建${keyZh}` },
  17. { method: 'post', path: `${rkey}/:id`, controller: `${ckey}.update`, name: `${ckey}Update`, zh: `修改${keyZh}` },
  18. { method: 'delete', path: `${rkey}/:id`, controller: `${ckey}.destroy`, name: `${ckey}Delete`, zh: `删除${keyZh}` },
  19. ];
  20. module.exports = app => {
  21. routerRegister(app, routes, keyZh, rkey, ckey);
  22. };