You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
|
|
import Vue from "vue";
|
|
|
|
import VueRouter from "vue-router";
|
|
|
|
|
|
|
|
// 引入组件
|
|
|
|
import test from "~/pages/test";
|
|
|
|
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 login from "~/pages/login";
|
|
|
|
import empty from "~/components/empty";
|
|
|
|
import myCourse from "~/pages/teacher/myCourse";
|
|
|
|
import tb_course from "~/components/tb_course";
|
|
|
|
|
|
|
|
// 要告诉 vue 使用 vueRouter
|
|
|
|
Vue.use(VueRouter);
|
|
|
|
|
|
|
|
const routes = [
|
|
|
|
{
|
|
|
|
path: "/",
|
|
|
|
redirect: '/test'
|
|
|
|
},
|
|
|
|
{
|
|
|
|
path:'/test',
|
|
|
|
component:test
|
|
|
|
},
|
|
|
|
{
|
|
|
|
path: "/teacher",
|
|
|
|
component: empty,
|
|
|
|
children: [
|
|
|
|
{
|
|
|
|
path: '',
|
|
|
|
name:'teacher',
|
|
|
|
component: teacher
|
|
|
|
},
|
|
|
|
{
|
|
|
|
path: 'personal',
|
|
|
|
component: personal
|
|
|
|
},
|
|
|
|
{
|
|
|
|
path:'myCourse',
|
|
|
|
component:myCourse
|
|
|
|
}
|
|
|
|
]
|
|
|
|
},
|
|
|
|
{
|
|
|
|
path:'/manager',
|
|
|
|
component:manager,
|
|
|
|
children:[
|
|
|
|
|
|
|
|
]
|
|
|
|
},
|
|
|
|
{
|
|
|
|
path:'/supManager',
|
|
|
|
component:supManager
|
|
|
|
},
|
|
|
|
|
|
|
|
{
|
|
|
|
path:"/login",
|
|
|
|
component:login
|
|
|
|
},
|
|
|
|
{
|
|
|
|
path:'/tbCourse',
|
|
|
|
component:tb_course
|
|
|
|
}
|
|
|
|
]
|
|
|
|
|
|
|
|
let router = new VueRouter({
|
|
|
|
routes
|
|
|
|
})
|
|
|
|
export default router;
|