| | |
| | | import { createMemoryHistory, createRouter } from 'vue-router' |
| | | import { createWebHashHistory, createRouter } from 'vue-router'; |
| | | |
| | | import Layout from '@/layout/index.vue'; |
| | | |
| | | const routes = [ |
| | | { path: '/', component: () => import('@/views/home/index.vue') }, |
| | | ] |
| | | { |
| | | path: '/', |
| | | redirect: '/login' |
| | | }, |
| | | |
| | | { |
| | | path: '/', |
| | | component: Layout, |
| | | children: [ |
| | | { |
| | | path: 'index', |
| | | name: 'index', |
| | | component: () => import('@/views/home/index.vue'), |
| | | }, |
| | | { |
| | | path: 'menu', |
| | | name: 'menu', |
| | | component: () => import('@/views/menu/index.vue') |
| | | }, |
| | | ] |
| | | }, |
| | | // 登录 |
| | | { |
| | | path: '/login', |
| | | component: () => import('@/views/login/index.vue'), |
| | | }, |
| | | // 在线培训 |
| | | { |
| | | path: '/train', |
| | | component: () => import('@/views/train/index.vue'), |
| | | }, |
| | | // 会议 |
| | | { |
| | | path: '/meet', |
| | | component: () => import('@/views/meet/index.vue'), |
| | | }, |
| | | // 考试列表 |
| | | { |
| | | path: '/exam-list', |
| | | component: () => import('@/views/exam-list/index.vue'), |
| | | }, |
| | | // 考试页面 |
| | | { |
| | | path: '/exam', |
| | | component: () => import('@/views/exam/index.vue'), |
| | | }, |
| | | |
| | | // 成绩单列表 |
| | | { |
| | | path: '/grade-list', |
| | | component: () => import('@/views/grade-list/index.vue'), |
| | | }, |
| | | // 试卷 |
| | | { |
| | | path: '/grade', |
| | | component: () => import('@/views/grade/index.vue'), |
| | | }, |
| | | |
| | | // 教学资源 |
| | | { |
| | | path: '/folder', |
| | | component: () => import('@/views/folder/index.vue'), |
| | | }, |
| | | ]; |
| | | |
| | | const router = createRouter({ |
| | | history: createMemoryHistory(), |
| | | history: createWebHashHistory(), |
| | | routes, |
| | | }) |
| | | }); |
| | | |
| | | export default router; |