12345678910111213141516171819202122 |
- 'use strict';
- // 路由配置
- const path = require('path');
- const regPath = path.resolve('app', 'public', 'routerRegister');
- const routerRegister = require(regPath);
- const rkey = 'eliminate';
- const ckey = 'eliminate';
- const keyZh = '淘汰赛赛程';
- const routes = [
- { method: 'get', path: `${rkey}/ranking`, controller: `${ckey}.ranking`, name: `${ckey}Ranking`, zh: `${keyZh}淘汰赛选手排名` },
- { method: 'get', path: `${rkey}/playerList`, controller: `${ckey}.playerList`, name: `${ckey}PlayerList`, zh: `${keyZh}淘汰赛选手数据` },
- { method: 'get', path: `${rkey}/graphData`, controller: `${ckey}.graphData`, name: `${ckey}GraphData`, zh: `${keyZh}淘汰赛流程图数据查询` },
- { 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);
- };
|