[fix][V]:修改路由

master
Romesum 5 years ago
parent 03d604f4dc
commit 8e9f02fc31

@ -1,21 +1,13 @@
<template> <template>
<div> <div>
<home :names="{name1:'管理实验室',name2:'管理教师/管理员信息',name3:'新增教师/管理员信息'}" :user="user"></home> <router-view></router-view>
</div> </div>
</template> </template>
<script> <script>
import home from "~/components/home";
export default { export default {
name: "index", name: "empty"
data(){
return{
user:"林大池"
}
},
components:{
home
}
} }
</script> </script>

@ -14,6 +14,10 @@ import tb_course from "~/components/tb_course";
import labApplyDetail from "~/pages/labApplyDetail"; import labApplyDetail from "~/pages/labApplyDetail";
import applyLab from "~/pages/teacher/applyLab"; import applyLab from "~/pages/teacher/applyLab";
import myApplyRecord from "~/pages/teacher/myApplyRecord"; import myApplyRecord from "~/pages/teacher/myApplyRecord";
import supHome from "~/components/supManager/home";
import supIndex from "~/components/supManager/index";
import globalPersonal from "~/components/personal";
import userManage from "~/components/supManager/userManage";
// 要告诉 vue 使用 vueRouter // 要告诉 vue 使用 vueRouter
Vue.use(VueRouter); Vue.use(VueRouter);
@ -24,8 +28,8 @@ const routes = [
redirect: '/login' redirect: '/login'
}, },
{ {
path:'/test', path: '/test',
component:test component: test
}, },
{ {
path: "/teacher", path: "/teacher",
@ -33,7 +37,7 @@ const routes = [
children: [ children: [
{ {
path: '', path: '',
name:'teacher', name: 'teacher',
component: teacher component: teacher
}, },
{ {
@ -41,42 +45,63 @@ const routes = [
component: personal component: personal
}, },
{ {
path:'myCourse', path: 'myCourse',
component:myCourse component: myCourse
}, },
{ {
path:'applyLab', path: 'applyLab',
component:applyLab component: applyLab
}, },
{ {
path:'myApplyRecord', path: 'myApplyRecord',
component:myApplyRecord component: myApplyRecord
} }
] ]
}, },
{ {
path:'/manager', path: '/manager',
component:manager, component: manager,
children:[ children: []
},
] {
path: '/supManager',
component: supManager,
children: [
{
path: '',
component: supHome
},
{
path: 'index',
component: supIndex,
children: [
{
path: 'personal',
component: globalPersonal
},{
path: 'labManage',
component: globalPersonal
}, },
{ {
path:'/supManager', path: 'userManage',
component:supManager component: userManage
}
]
}
]
}, },
{ {
path:"/login", path: "/login",
component:login component: login
}, },
{ {
path:'/tbCourse', path: '/tbCourse',
component:tb_course component: tb_course
}, },
{ {
path:'/labApplyDetail', path: '/labApplyDetail',
component:labApplyDetail component: labApplyDetail
} }
] ]

Loading…
Cancel
Save