index.js 2.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798
  1. import Vue from "vue";
  2. import Router from "vue-router";
  3. Vue.use(Router);
  4. const router = new Router({
  5. routes: [
  6. {
  7. path: "/",
  8. component: () => import("@/pages/layout/"),
  9. children: [
  10. {
  11. path: "/home",
  12. name: "企业账号",
  13. component: () => import("@/pages/home"),
  14. meta: { index: "1-1" }
  15. },
  16. {
  17. path: "/authentication",
  18. name: "企业认证",
  19. component: () => import("@/pages/authentication"),
  20. meta: { index: "1-2" }
  21. },
  22. {
  23. path: "/rental-info",
  24. name: "出租信息",
  25. component: () => import("@/pages/rental-info"),
  26. meta: { index: "2-1" }
  27. },
  28. {
  29. path: "/sell-info",
  30. name: "出售信息",
  31. component: () => import("@/pages/sell-info"),
  32. meta: { index: "2-2" }
  33. },
  34. {
  35. path: "/site-decoration",
  36. name: "工地装修",
  37. component: () => import("@/pages/site-decoration"),
  38. meta: { index: "2-3" }
  39. },
  40. {
  41. path: "/z-carousel",
  42. name: "轮播图",
  43. component: () => import("@/pages/z-carousel"),
  44. meta: { index: "3-1" }
  45. },
  46. {
  47. path: "/recommended",
  48. name: "推荐位",
  49. component: () => import("@/pages/recommended"),
  50. meta: { index: "3-2" }
  51. },
  52. {
  53. path: "/download",
  54. name: "场景下载",
  55. component: () => import("@/pages/download"),
  56. meta: { index: "4" }
  57. },
  58. {
  59. path: "/equipment",
  60. name: "设备管理",
  61. component: () => import("@/pages/equipment"),
  62. meta: { index: "5" }
  63. },
  64. // {
  65. // path: '/device',
  66. // name: '设备管理',
  67. // component: require('@/pages/device').default,
  68. // meta: {index: '5'}
  69. // },
  70. {
  71. path: "/scene",
  72. name: "场景管理",
  73. component: () => import("@/pages/scene"),
  74. meta: { index: "6" }
  75. },
  76. {
  77. path: "/bindAccount",
  78. name: "绑定账号",
  79. component: () => import("@/pages/bindAccount"),
  80. meta: { index: "7" }
  81. }
  82. ]
  83. },
  84. {
  85. path: "/login",
  86. name: "登录",
  87. component: () => import("@/pages/login")
  88. }
  89. ]
  90. });
  91. const originalPush = Router.prototype.push;
  92. Router.prototype.push = function push(location) {
  93. return originalPush.call(this, location).catch(err => err);
  94. };
  95. export default router;