zhongshujie
5 天以前 19a81bb5ef98c4eaf1edd622f95ebb938b5fffc8
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) {
@@ -11,12 +12,13 @@
Vue.use(VueRouter);
const routes = [{
const routes = [
  {
    path: "/",
    name: "HomeLayout",
    component: HomeLayout,
    redirect: {
      name: "honor",
      name: "chronology",
    },
    children: [
      // 在主框架内
@@ -24,13 +26,12 @@
        path: "/chronology",
        name: "chronology",
        meta: {
          name: "首页",
          name: "年谱",
          authentication: false, // 是否需要登录验证
          keepAlive: false, // 是否需要缓存
        },
        component: () => import("@/views/chronology/index.vue")
        component: () => import("@/views/chronology/index.vue"),
      },
      {
        path: "/honor",
        name: "honor",
@@ -39,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",
@@ -49,8 +73,7 @@
      //   },
      //   component: () => import("@/views/login/login")
      // },
    ]
    ],
  },
  // 不在主框架内
@@ -61,9 +84,9 @@
    meta: {
      name: "首页",
      authentication: false, // 是否需要登录验证
      keepAlive: false // 是否需要缓存
      keepAlive: false, // 是否需要缓存
    },
    component: Home
    component: Home,
  },
  // {
  //   path: "/pdf",
@@ -76,4 +99,4 @@
  routes,
});
export default router;
export default router;