router.js 964 B

123456789101112131415161718192021222324252627
  1. 'use strict';
  2. /**
  3. * @param {Egg.Application} app - egg application
  4. */
  5. module.exports = app => {
  6. const { router, controller } = app;
  7. const prefix = '/api/htyd';
  8. router.get('/', controller.home.index);
  9. // 二维码
  10. router.get(`${prefix}/qrcode`, controller.qrcode.index);
  11. // 登陆
  12. router.post(`${prefix}/login`, controller.login.login);
  13. // 工具函数
  14. router.post(`${prefix}/util`, controller.util.utilMethod);
  15. router.get(`${prefix}/wxpay/auth`, controller.wxpay.toAuth);
  16. router.get(`${prefix}/wxpay/cash`, controller.wxpay.cash);
  17. require('./router/card')(app); // 办卡
  18. require('./router/car_show')(app); // 车奖
  19. require('./router/cash')(app); // 提现
  20. require('./router/record')(app); // 记录
  21. require('./router/count')(app); // 统计
  22. require('./router/carousel')(app); // 轮播
  23. require('./router/xzqh')(app); // 行政区划
  24. require('./router/set')(app); // 套餐
  25. require('./router/config')(app); // 配置
  26. };