shopNotice.js 1.2 KB

123456789101112131415161718192021
  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 = 'shopNotice';
  7. const ckey = 'shop.shopNotice';
  8. const keyZh = '店铺系统消息';
  9. const routes = [
  10. { method: 'get', path: `${rkey}`, controller: `${ckey}.index`, name: `${ckey}Query`, zh: `${keyZh}列表查询` },
  11. { method: 'get', path: `${rkey}/cnr/:shop`, controller: `${ckey}.cnr`, name: `${ckey}cnr`, zh: `${keyZh}查询未读` },
  12. { method: 'get', path: `${rkey}/:id`, controller: `${ckey}.show`, name: `${ckey}Show`, zh: `${keyZh}查询` },
  13. { method: 'post', path: `${rkey}/rts`, controller: `${ckey}.rts`, name: `${ckey}rts`, zh: `发送-处理发货-${keyZh}` },
  14. { method: 'post', path: `${rkey}/rtas`, controller: `${ckey}.rtas`, name: `${ckey}rtas`, zh: `发送-处理售后-${keyZh}` },
  15. { method: 'post', path: `${rkey}/:id`, controller: `${ckey}.update`, name: `${ckey}Update`, zh: `修改${keyZh}` },
  16. { method: 'delete', path: `${rkey}/:id`, controller: `${ckey}.destroy`, name: `${ckey}Delete`, zh: `删除${keyZh}` },
  17. ];
  18. module.exports = app => {
  19. routerRegister(app, routes, keyZh, rkey, ckey);
  20. };