home.js 557 B

1234567891011121314151617181920212223
  1. 'use strict';
  2. /**
  3. * [home的模块功能]
  4. * @author szjcomo
  5. * @createTime 2020-08-03
  6. * @param {[type]} app [description]
  7. * @return {[type]} [description]
  8. */
  9. module.exports = app => {
  10. /**
  11. * 首页路由
  12. */
  13. app.router.get('/', app.controller.home.home.index);
  14. /**
  15. * [subRouter 命名空间路由]
  16. * @type {[type]}
  17. */
  18. const subRouter = app.router.namespace(`/${process.env.APP_CUSTOME || 'universal'}`);
  19. subRouter.get('/', app.controller.home.home.index);
  20. // 加载商城路由
  21. require('./shop.js')(app);
  22. };