|
@@ -9,22 +9,20 @@ import workManagement from "./workManagement"; // 工作管理
|
|
|
|
|
|
Vue.use(VueRouter);
|
|
|
|
|
|
-const routes = [
|
|
|
- {
|
|
|
+const routes = [{
|
|
|
path: "/login",
|
|
|
name: "login",
|
|
|
component: () => import("../views/login.vue")
|
|
|
},
|
|
|
{
|
|
|
- path: "/",
|
|
|
- name: "index",
|
|
|
- meta: {
|
|
|
- tabname: "首页"
|
|
|
- },
|
|
|
- component: () => import('../views/index'),
|
|
|
- redirect: '/mainPage',
|
|
|
- children: [
|
|
|
- {
|
|
|
+ path: "/",
|
|
|
+ name: "index",
|
|
|
+ meta: {
|
|
|
+ tabname: "首页"
|
|
|
+ },
|
|
|
+ component: () => import('../views/index'),
|
|
|
+ redirect: '/mainPage',
|
|
|
+ children: [{
|
|
|
path: "/mainPage",
|
|
|
name: "mainPage",
|
|
|
// meta: {
|
|
@@ -81,32 +79,30 @@ const routes = [
|
|
|
component: () => import("@/views/systemManagement/index"),
|
|
|
redirect: '/index',
|
|
|
children: systemManagement,
|
|
|
- },
|
|
|
+ },
|
|
|
]
|
|
|
- .concat([{
|
|
|
- path: "*",
|
|
|
- name: "*",
|
|
|
- component: () => import("../views/mainPage.vue")
|
|
|
- }, ]),
|
|
|
+ // .concat([{
|
|
|
+ // path: "*",
|
|
|
+ // name: "*",
|
|
|
+ // component: () => import("../views/mainPage.vue")
|
|
|
+ // }, ]),
|
|
|
},
|
|
|
+ {
|
|
|
+ path: "*",
|
|
|
+ name: "*",
|
|
|
+ component: () => import("@/views/mainPage.vue")
|
|
|
+ }
|
|
|
];
|
|
|
-// {
|
|
|
-// path: "/",
|
|
|
-// name: "About",
|
|
|
-// // route level code-splitting
|
|
|
-// // this generates a separate chunk (about.[hash].js) for this route
|
|
|
-// // which is lazy-loaded when the route is visited.
|
|
|
-// component: () =>
|
|
|
-// import( /* webpackChunkName: "about" */ "../views/About.vue"),
|
|
|
-// },
|
|
|
-
|
|
|
|
|
|
const router = new VueRouter({
|
|
|
mode: "history",
|
|
|
base: process.env.BASE_URL,
|
|
|
routes,
|
|
|
scrollBehavior(to, from, savedPosition) {
|
|
|
- return {x: 0, y: 0}
|
|
|
+ return {
|
|
|
+ x: 0,
|
|
|
+ y: 0
|
|
|
+ }
|
|
|
}
|
|
|
});
|
|
|
|