eliminate.js 1.3 KB

12345678910111213141516171819202122
  1. 'use strict';
  2. // 路由配置
  3. const path = require('path');
  4. const regPath = path.resolve('app', 'public', 'routerRegister');
  5. const routerRegister = require(regPath);
  6. const rkey = 'eliminate';
  7. const ckey = 'eliminate';
  8. const keyZh = '淘汰赛赛程';
  9. const routes = [
  10. { method: 'get', path: `${rkey}/ranking`, controller: `${ckey}.ranking`, name: `${ckey}Ranking`, zh: `${keyZh}淘汰赛选手排名` },
  11. { method: 'get', path: `${rkey}/playerList`, controller: `${ckey}.playerList`, name: `${ckey}PlayerList`, zh: `${keyZh}淘汰赛选手数据` },
  12. { method: 'get', path: `${rkey}/graphData`, controller: `${ckey}.graphData`, name: `${ckey}GraphData`, zh: `${keyZh}淘汰赛流程图数据查询` },
  13. { method: 'get', path: `${rkey}`, controller: `${ckey}.index`, name: `${ckey}Query`, zh: `${keyZh}列表查询` },
  14. { method: 'get', path: `${rkey}/:id`, controller: `${ckey}.show`, name: `${ckey}Show`, zh: `${keyZh}查询` },
  15. { method: 'post', path: `${rkey}`, controller: `${ckey}.create`, name: `${ckey}Create`, zh: `创建${keyZh}` },
  16. { method: 'post', path: `${rkey}/:id`, controller: `${ckey}.update`, name: `${ckey}Update`, zh: `修改${keyZh}` },
  17. // { method: 'delete', path: `${rkey}/:id`, controller: `${ckey}.destroy`, name: `${ckey}Delete`, zh: `删除${keyZh}` },
  18. ];
  19. module.exports = app => {
  20. routerRegister(app, routes, keyZh, rkey, ckey);
  21. };