123456789101112131415161718192021 |
- 'use strict';
- // 路由配置
- const path = require('path');
- const regPath = path.resolve('app', 'public', 'routerRegister');
- const routerRegister = require(regPath);
- const rkey = 'actOrder';
- const ckey = 'trade.actOrder';
- const keyZh = '平台活动-订单';
- const routes = [
- { method: 'post', path: `${rkey}/toRefund`, controller: `${ckey}.toRefund`, name: `${ckey}toRefund`, zh: `${keyZh}批量返现` },
- { method: 'get', path: `${rkey}/grmm/:id`, controller: `${ckey}.grmm`, name: `${ckey}grmm`, zh: `${keyZh}计算本单最大可以返现的金额` },
- { method: 'get', path: `${rkey}`, middleware: [ 'dealQuery' ], 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);
- };
|