1234567891011121314151617 |
- 'use strict';
- // 路由配置
- const path = require('path');
- const regPath = path.resolve('app', 'public', 'routerRegister');
- const routerRegister = require(regPath);
- const rkey = 'viewOrder';
- const ckey = 'view.order';
- const keyZh = '订单相关视图';
- const routes = [
- { method: 'get', path: `${rkey}`, controller: `${ckey}.allOrder`, name: `${ckey}allOrder`, zh: '全部订单' },
- { method: 'get', path: `${rkey}/getOrder/:id`, controller: `${ckey}.getOrder`, name: `${ckey}getOrder`, zh: '订单查询' },
- ];
- module.exports = app => {
- routerRegister(app, routes, keyZh, rkey, ckey);
- };
|