ZhangXianQiang
2024-06-05 7edbe9d7e6cbeb116d3d6d9b00da09dc5047aa99
src/router/index.js
@@ -1,13 +1,40 @@
import { createMemoryHistory, createRouter } from 'vue-router';
import Layout from '@/layout/index.vue';
const routes = [
  {
    path: '/',
    redirect: '/index'
  },
  { path: '/index', component: () => import('@/views/home/index.vue') },
  { path: '/menu', component: () => import('@/views/menu/index.vue') },
  {
    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({