1234567891011121314151617 |
- 'use strict';
- // 路由配置
- const path = require('path');
- const regPath = path.resolve('app', 'public', 'routerRegister');
- const routerRegister = require(regPath);
- const rkey = 'selfShop';
- const ckey = 'shop.selfShop';
- const keyZh = '自营店铺';
- const routes = [
- { method: 'get', path: `${rkey}/goods`, controller: `${ckey}.goods`, middleware: [ 'dealQuery' ], name: `${ckey}Goods`, zh: `${keyZh}商品查询` },
- { method: 'get', path: `${rkey}`, controller: `${ckey}.index`, name: `${ckey}Query`, zh: `${keyZh}查询` },
- { method: 'post', path: `${rkey}/:id`, controller: `${ckey}.update`, name: `${ckey}Update`, zh: `修改${keyZh}` },
- ];
- module.exports = app => {
- routerRegister(app, routes, keyZh, rkey, ckey);
- };
|