import Vue from "vue"; import Router from "vue-router"; Vue.use(Router); const router = new Router({ routes: [ { path: "/", component: () => import("@/pages/layout/"), children: [ { path: "/home", name: "企业账号", component: () => import("@/pages/home"), meta: { index: "1-1" } }, { path: "/authentication", name: "企业认证", component: () => import("@/pages/authentication"), meta: { index: "1-2" } }, { path: "/rental-info", name: "出租信息", component: () => import("@/pages/rental-info"), meta: { index: "2-1" } }, { path: "/sell-info", name: "出售信息", component: () => import("@/pages/sell-info"), meta: { index: "2-2" } }, { path: "/site-decoration", name: "工地装修", component: () => import("@/pages/site-decoration"), meta: { index: "2-3" } }, { path: "/z-carousel", name: "轮播图", component: () => import("@/pages/z-carousel"), meta: { index: "3-1" } }, { path: "/recommended", name: "推荐位", component: () => import("@/pages/recommended"), meta: { index: "3-2" } }, { path: "/download", name: "场景下载", component: () => import("@/pages/download"), meta: { index: "4" } }, { path: "/equipment", name: "设备管理", component: () => import("@/pages/equipment"), meta: { index: "5" } }, // { // path: '/device', // name: '设备管理', // component: require('@/pages/device').default, // meta: {index: '5'} // }, { path: "/scene", name: "场景管理", component: () => import("@/pages/scene"), meta: { index: "6" } }, { path: "/bindAccount", name: "绑定账号", component: () => import("@/pages/bindAccount"), meta: { index: "7" } } ] }, { path: "/login", name: "登录", component: () => import("@/pages/login") } ] }); const originalPush = Router.prototype.push; Router.prototype.push = function push(location) { return originalPush.call(this, location).catch(err => err); }; export default router;