1234567891011121314151617181920212223 |
- 'use strict';
- // 路由配置
- const path = require('path');
- const regPath = path.resolve('app', 'public', 'routerRegister');
- const routerRegister = require(regPath);
- const rkey = 'afterSale';
- const ckey = 'trade.afterSale';
- const keyZh = '售后';
- const routes = [
- { method: 'get', path: `${rkey}/canRefund/:id`, controller: `${ckey}.canRefund`, name: `${ckey}canRefund`, zh: `${keyZh}查询是否可以退款退货` },
- { method: 'get', path: `${rkey}/getTransportInfo/:id`, controller: `${ckey}.getTransportInfo`, name: `${ckey}getTransportInfo`, zh: `${keyZh}查询售后快递` },
- { method: 'post', path: `${rkey}/orderCancel`, controller: `${ckey}.orderCancel`, name: `${ckey}orderCancel`, zh: '取消订单' },
- { method: 'post', path: `${rkey}/cgfr`, controller: `${ckey}.cgfr`, name: `${ckey}cgfr`, zh: '查询退货商品的金额设置' },
- { method: 'get', path: `${rkey}`, controller: `${ckey}.index`, name: `${ckey}Query`, zh: `${keyZh}列表查询` },
- { method: 'get', path: `${rkey}/:id`, controller: `${ckey}.show`, name: `${ckey}Show`, zh: `${keyZh}查询` },
- { method: 'post', path: `${rkey}`, controller: `${ckey}.create`, name: `${ckey}Create`, zh: `创建${keyZh}` },
- { method: 'post', path: `${rkey}/:id`, controller: `${ckey}.update`, name: `${ckey}Update`, zh: `修改${keyZh}` },
- { method: 'delete', path: `${rkey}/:id`, controller: `${ckey}.destroy`, name: `${ckey}Delete`, zh: `删除${keyZh}` },
- ];
- module.exports = app => {
- routerRegister(app, routes, keyZh, rkey, ckey);
- };
|