|
|
@ -4,8 +4,11 @@ import VueRouter from "vue-router";
|
|
|
|
// 引入组件
|
|
|
|
// 引入组件
|
|
|
|
import test from "~/pages/test";
|
|
|
|
import test from "~/pages/test";
|
|
|
|
import teacher from "~/pages/teacher/index";
|
|
|
|
import teacher from "~/pages/teacher/index";
|
|
|
|
|
|
|
|
import manager from "~/pages/manager/index";
|
|
|
|
|
|
|
|
import supManager from "~/pages/supManager/index";
|
|
|
|
import personal from "~/pages/teacher/personal";
|
|
|
|
import personal from "~/pages/teacher/personal";
|
|
|
|
import login from "~/components/login";
|
|
|
|
import login from "~/pages/login";
|
|
|
|
|
|
|
|
import home from "~/components/home";
|
|
|
|
|
|
|
|
|
|
|
|
// 要告诉 vue 使用 vueRouter
|
|
|
|
// 要告诉 vue 使用 vueRouter
|
|
|
|
Vue.use(VueRouter);
|
|
|
|
Vue.use(VueRouter);
|
|
|
@ -13,10 +16,10 @@ Vue.use(VueRouter);
|
|
|
|
const routes = [
|
|
|
|
const routes = [
|
|
|
|
{
|
|
|
|
{
|
|
|
|
path: "/",
|
|
|
|
path: "/",
|
|
|
|
redirect: '/home'
|
|
|
|
redirect: '/test'
|
|
|
|
},
|
|
|
|
},
|
|
|
|
{
|
|
|
|
{
|
|
|
|
path: "/home",
|
|
|
|
path:'/test',
|
|
|
|
component:test
|
|
|
|
component:test
|
|
|
|
},
|
|
|
|
},
|
|
|
|
{
|
|
|
|
{
|
|
|
@ -33,9 +36,25 @@ const routes = [
|
|
|
|
}
|
|
|
|
}
|
|
|
|
]
|
|
|
|
]
|
|
|
|
},
|
|
|
|
},
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
path:'/manager',
|
|
|
|
|
|
|
|
component:manager,
|
|
|
|
|
|
|
|
children:[
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
]
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
path:'/supManager',
|
|
|
|
|
|
|
|
component:supManager
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
|
|
{
|
|
|
|
{
|
|
|
|
path:"/login",
|
|
|
|
path:"/login",
|
|
|
|
component:login
|
|
|
|
component:login
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
path:"/home",
|
|
|
|
|
|
|
|
component:home
|
|
|
|
}
|
|
|
|
}
|
|
|
|
]
|
|
|
|
]
|
|
|
|
|
|
|
|
|
|
|
|