zhongshujie
2025-04-08 f823acd50561f5bfbe871b30ef0a46209ff89c92
src/router/index.js
@@ -3,6 +3,7 @@
import HomeLayout from "@/layout";
import Home from "@/views/home";
import Honor from "@/views/honors";
import details from "@/views/achievements/details.vue"
const originalPush = VueRouter.prototype.push;
VueRouter.prototype.push = function push(location) {
@@ -17,21 +18,20 @@
    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 +40,30 @@
        },
        component: Honor,
      },
      {
        path: "/achievements",
        name: "achievements",
        meta: {
          name: "学术成果",
        },
        component: () => import("@/views/achievements/index.vue"),
      },
      {
        path: "/details",
        name: "details",
        meta: {
          name: "学术成果详情",
        },
        component: details,
      },
      {
        path: "/directory",
        name: "directory",
        meta: {
          name: "学生名录",
        },
        component: () => import("@/views/directory/index.vue"),
      },
      // {
      //   path: "/login",
      //   name: "login",
@@ -52,7 +75,19 @@
      // },
    ],
  },
  // 不在主框架内
  {
    path: "/home",
    name: "home",
    meta: {
      name: "首页",
      authentication: false, // 是否需要登录验证
      keepAlive: false, // 是否需要缓存
    },
    component: Home,
  },
  // {
  //   path: "/pdf",
  //   name: "pdf",