zhongshujie
5 天以前 c61df3bc67fcbec7bf311f54d66f1fb8769ddfca
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: [
      // 在主框架内
@@ -28,7 +30,7 @@
          authentication: false, // 是否需要登录验证
          keepAlive: false, // 是否需要缓存
        },
        component: () => import("@/views/chronology/index.vue")
        component: () => import("@/views/chronology/index.vue"),
      },
      {
        path: "/honor",
@@ -47,6 +49,14 @@
        component: () => import("@/views/achievements/index.vue"),
      },
      {
        path: "/details",
        name: "details",
        meta: {
          name: "学术成果详情",
        },
        component: details,
      },
      {
        path: "/directory",
        name: "directory",
        meta: {
@@ -63,8 +73,7 @@
      //   },
      //   component: () => import("@/views/login/login")
      // },
    ]
    ],
  },
  // 不在主框架内
@@ -75,9 +84,9 @@
    meta: {
      name: "首页",
      authentication: false, // 是否需要登录验证
      keepAlive: false // 是否需要缓存
      keepAlive: false, // 是否需要缓存
    },
    component: Home
    component: Home,
  },
  // {
  //   path: "/pdf",
@@ -90,4 +99,4 @@
  routes,
});
export default router;
export default router;