| | |
| | | import Vue from 'vue' |
| | | import Router from 'vue-router' |
| | | import index from '@/components/index' |
| | | import login from '@/components/login' |
| | | import Vue from "vue"; |
| | | import Router from "vue-router"; |
| | | import index from "@/components/index"; |
| | | import login from "@/components/login"; |
| | | import URLconfig from "../../static/URLconfig"; |
| | | import home from "@/components/home"; |
| | | |
| | | Vue.use(Router) |
| | | Vue.use(Router); |
| | | const routes = [ |
| | | { |
| | | path: '/', |
| | | redirect: "login", |
| | | path: "/", |
| | | redirect: "login" |
| | | }, |
| | | { |
| | | path: '/login', |
| | | name: 'login', |
| | | component: login, |
| | | path: "/login", |
| | | name: "login", |
| | | component: login |
| | | }, |
| | | { |
| | | path: '/index', |
| | | name: 'index', |
| | | path: "/index", |
| | | name: "index", |
| | | component: index |
| | | }, |
| | | { |
| | | path: "/home", |
| | | component: home, |
| | | redirect: "home", |
| | | hidden: true, |
| | | children: [ |
| | | { |
| | | path: "door", |
| | | name:'门户', |
| | | component: () => import("@/components/door.vue") |
| | | }, |
| | | { |
| | | path: "interactive", |
| | | name:'分系统交互管理', |
| | | component: () => import("@/components/interactive.vue") |
| | | } |
| | | ] |
| | | } |
| | | ]; |
| | | const router = new Router({ |
| | | mode: "history", |
| | | // base: URLconfig.routerBase, |
| | | routes, |
| | | routes |
| | | }); |
| | | // router.beforeEach((to, from, next) => { |
| | | // next(); |
| | | // }) |
| | | export default router; |
| | | |
| | | |