'use strict'; // 路由配置 const path = require('path'); const regPath = path.resolve('app', 'public', 'routerRegister'); const routerRegister = require(regPath); const rkey = 'util'; const ckey = 'util'; const keyZh = '工具接口'; const routes = [ { method: 'post', path: `${rkey}/crk`, controller: `${ckey}.crk`, zh: `${keyZh}-创建请求key` }, { method: 'get', path: `${rkey}/util`, controller: `${ckey}.util`, zh: `${keyZh}-工具` }, { method: 'post', path: `${rkey}/checkCanBuy`, controller: `${ckey}.checkCanBuy`, zh: `${keyZh}-检查是否可以购买商品` }, { method: 'post', path: `${rkey}/checkCartBuy`, controller: `${ckey}.checkCartBuy`, zh: `${keyZh}-检查选中的购物车商品是否可以购买` }, ]; module.exports = app => { routerRegister(app, routes, keyZh, rkey, ckey); };