From ef37c59e055a990ce247b265b27d3fcef430a243 Mon Sep 17 00:00:00 2001
From: 杨磊 <505174330@qq.com>
Date: 星期五, 15 八月 2025 10:19:18 +0800
Subject: [PATCH] first submit

---
 src/router/index.js |  149 +++++++++++++++++++++++++++++++++++++++++++++++++
 1 files changed, 149 insertions(+), 0 deletions(-)

diff --git a/src/router/index.js b/src/router/index.js
new file mode 100644
index 0000000..8175b50
--- /dev/null
+++ b/src/router/index.js
@@ -0,0 +1,149 @@
+import Vue from "vue";
+import VueRouter from "vue-router";
+import HomeLayout from "@/layout";
+import Home from "@/views/home";
+import Search from "@/views/home/search";
+
+import bookStore from "./modules/bookStore";
+import teachingServices from "./modules/teachingServices";
+import informationCenterRouter from "./modules/informationCenter";
+import aboutUs from "./modules/aboutUs";
+import preview from "./modules/preview"
+import baseLayout from "@/layout/base";
+const originalPush = VueRouter.prototype.push
+VueRouter.prototype.push = function push(location) {
+  return originalPush.call(this, location).catch(err => err)
+}
+
+Vue.use(VueRouter);
+
+const routes = [{
+  path: "/",
+  name: "HomeLayout",
+  component: HomeLayout,
+  redirect: {
+    name: "home"
+  },
+  children: [
+    // 鍦ㄤ富妗嗘灦鍐�
+    {
+      path: "home",
+      name: "home",
+      meta: {
+        name: "棣栭〉",
+        authentication: false, // 鏄惁闇�瑕佺櫥褰曢獙璇�
+        keepAlive: false, // 鏄惁闇�瑕佺紦瀛�
+      },
+      component: baseLayout,
+      redirect: {
+        name: "index"
+      },
+      children: [{
+        path: "index",
+        name: "index",
+        meta: {
+          name: "棣栭〉",
+          authentication: false, // 鏄惁闇�瑕佺櫥褰曢獙璇�
+          keepAlive: false, // 鏄惁闇�瑕佺紦瀛�
+        },
+        component: Home,
+      },
+      {
+        path: "search",
+        name: "search",
+        meta: {
+          name: "棣栭〉鎼滅储",
+          authentication: false, // 鏄惁闇�瑕佺櫥褰曢獙璇�
+          keepAlive: true, // 鏄惁闇�瑕佺紦瀛�
+        },
+        component: Search,
+      },
+      ],
+    },
+    {
+      path: "/login",
+      name: "login",
+      meta: {
+        name: "鐧诲綍",
+        authentication: false,
+      },
+      component: () => import("@/views/login/login"),
+    },
+    {
+      path: "/register",
+      name: "register",
+      meta: {
+        name: "娉ㄥ唽",
+        authentication: false,
+      },
+      component: () => import("@/views/login/register"),
+    },
+    {
+      path: "/personalCenter",
+      name: "personalCenter",
+      meta: {
+        name: "涓汉涓績",
+        authentication: true,
+      },
+      component: () => import("@/views/personalCenter"),
+    },
+    {
+      path: "/authorServices",
+      name: "authorServices",
+      meta: {
+        name: "浣滆�呮湇鍔�",
+        authentication: false,
+      },
+      component: () => import("@/views/authorServices"),
+    },
+    {
+      path: "/bindWeChat",
+      name: "bindWeChat",
+      meta: {
+        name: "缁戝畾寰俊",
+        authentication: true,
+      },
+      component: () => import("@/views/bindWeChat"),
+    },
+    {
+      path: "/bindWeChatBack",
+      name: "bindWeChatBack",
+      meta: {
+        name: "缁戝畾寰俊",
+        authentication: true,
+      },
+      component: () => import("@/views/bindWeChat/success"),
+    },
+    {
+      path: "/AdminLogin",
+      name: "AdminLogin",
+      meta: {
+        name: "绠$悊鐧诲綍",
+        noWrapHeadFooter: true,
+      },
+      component: () => import("@/views/login/adminLogin"),
+    },
+    ...bookStore,
+    ...teachingServices,
+    ...informationCenterRouter,
+    ...aboutUs,
+    ...preview
+  ],
+},
+// 涓嶅湪涓绘鏋跺唴
+
+{
+  path: "/findPassword",
+  name: "findPassword",
+  meta: {
+    name: "鐧诲綍",
+  },
+  component: () => import("@/views/login/findPassword"),
+},
+];
+
+const router = new VueRouter({
+  routes,
+});
+
+export default router;
\ No newline at end of file

--
Gitblit v1.9.1