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.
64 lines
1.3 KiB
64 lines
1.3 KiB
import {
|
|
createRouter,
|
|
createWebHashHistory
|
|
} from "vue-router"
|
|
|
|
const router = createRouter({
|
|
history: createWebHashHistory(),
|
|
routes: [{
|
|
path: '/',
|
|
redirect: '/login' //默认页面
|
|
},
|
|
{
|
|
path: '/index',
|
|
name: 'Index',
|
|
component: () => import('./view/student/index.vue')
|
|
},
|
|
{
|
|
path: '/login',
|
|
name: 'Login',
|
|
component: () => import('./view/Login.vue')
|
|
},
|
|
{
|
|
path: '/register',
|
|
name: 'Register',
|
|
component: () => import('./view/Register.vue')
|
|
},
|
|
{
|
|
path: '/student',
|
|
name: 'Student',
|
|
component: () => import('./view/student/index.vue'),
|
|
redirect: '/student/home',
|
|
children:[
|
|
{
|
|
path: 'home',
|
|
name: 'Home',
|
|
component: () => import('./view/student/home.vue'),
|
|
},
|
|
{
|
|
path: 'personalCenter',
|
|
component: () => import('./view/student/personalCenter.vue'),
|
|
},
|
|
{
|
|
path: 'discussion',
|
|
component: () => import('./view/student/discussion.vue'),
|
|
},
|
|
{
|
|
path: 'myExam',
|
|
component: () => import('./view/student/myExam.vue'),
|
|
},
|
|
{
|
|
path: 'myScore',
|
|
component: () => import('./view/student/myScore.vue'),
|
|
},
|
|
{
|
|
path: 'exam',
|
|
name: 'Exam',
|
|
component: () => import('./view/student/exam.vue'),
|
|
}
|
|
]
|
|
},
|
|
]
|
|
})
|
|
|
|
export default router |