admin.js 1.4 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 = 'statistics/admin';
  7. const ckey = 'statistics.admin';
  8. const keyZh = '中台统计';
  9. const routes = [
  10. { method: 'get', path: `${rkey}/todo`, controller: `${ckey}.todo`, name: `${ckey}Todo`, zh: `${keyZh}待办查询` },
  11. { method: 'get', path: `${rkey}/stockWarning`, controller: `${ckey}.stockWarning`, name: `${ckey}stockWarning`, zh: `${keyZh}库存警告` },
  12. { method: 'get', path: `${rkey}/notDealAfterSale`, controller: `${ckey}.notDealAfterSale`, name: `${ckey}notDealAfterSale`, zh: `${keyZh}未处理售后` },
  13. { method: 'get', path: `${rkey}/notSend`, controller: `${ckey}.notSend`, name: `${ckey}notSend`, zh: `${keyZh}未发货` },
  14. { method: 'get', path: `${rkey}/notPay`, controller: `${ckey}.notPay`, name: `${ckey}notPay`, zh: `${keyZh}未付款订单数` },
  15. { method: 'get', path: `${rkey}/makeOrder`, controller: `${ckey}.makeOrder`, name: `${ckey}makeOrder`, zh: `${keyZh}统计支付订单` },
  16. { method: 'get', path: `${rkey}/makeAfterSale`, controller: `${ckey}.makeAfterSale`, name: `${ckey}makeAfterSale`, zh: `${keyZh}售后数` },
  17. { method: 'get', path: `${rkey}/sellTotal`, controller: `${ckey}.sellTotal`, name: `${ckey}sellTotal`, zh: `${keyZh}查询销售额` },
  18. ];
  19. module.exports = app => {
  20. routerRegister(app, routes, keyZh, rkey, ckey);
  21. };