杨磊
2025-04-07 ce9ff4af4cf7ccc87d3ef94a849942baf112b811
src/router/index.js
@@ -11,27 +11,25 @@
Vue.use(VueRouter);
const routes = [
  {
const routes = [{
    path: "/",
    name: "HomeLayout",
    component: HomeLayout,
    redirect: {
      name: "honor",
      name: "chronology",
    },
    children: [
      // 在主框架内
      {
        path: "/home",
        name: "home",
        path: "/chronology",
        name: "chronology",
        meta: {
          name: "首页",
          name: "年谱",
          authentication: false, // 是否需要登录验证
          keepAlive: false, // 是否需要缓存
        },
        component: Home,
        component: () => import("@/views/chronology/index.vue")
      },
      {
        path: "/honor",
        name: "honor",
@@ -40,7 +38,22 @@
        },
        component: Honor,
      },
      {
        path: "/achievements",
        name: "achievements",
        meta: {
          name: "学术成果",
        },
        component: () => import("@/views/achievements/index.vue"),
      },
      {
        path: "/directory",
        name: "directory",
        meta: {
          name: "学生名录",
        },
        component: () => import("@/views/directory/index.vue"),
      },
      // {
      //   path: "/login",
      //   name: "login",
@@ -50,9 +63,22 @@
      //   },
      //   component: () => import("@/views/login/login")
      // },
    ],
    ]
  },
  // 不在主框架内
  {
    path: "/home",
    name: "home",
    meta: {
      name: "首页",
      authentication: false, // 是否需要登录验证
      keepAlive: false // 是否需要缓存
    },
    component: Home
  },
  // {
  //   path: "/pdf",
  //   name: "pdf",
@@ -64,4 +90,4 @@
  routes,
});
export default router;
export default router;