ZhangXianQiang
2024-06-05 5c0d64898ddeabb85ddae32bb620b89b10cee930
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
import { createMemoryHistory, createRouter } from 'vue-router';
 
import Layout from '@/layout/index.vue';
 
const routes = [
  {
    path: '/',
    redirect: '/exam'
  },
 
  {
    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: '/exam-list',
    component: () => import('@/views/exam-list/index.vue'),
  },
  // 考试页面
  {
    path: '/exam',
    component: () => import('@/views/exam/index.vue'),
  },
];
 
const router = createRouter({
  history: createMemoryHistory(),
  routes,
});
 
export default router;