From 49a435043b0b1a289a24606e35253365d7ab3956 Mon Sep 17 00:00:00 2001
From: QYF-GitLab1 <1940665526@qq.com>
Date: 星期一, 25 八月 2025 17:51:57 +0800
Subject: [PATCH] 首页、及教学出版样式修改

---
 src/router/index.js |  423 +++++++++++++++++++++++++++++++++++-----------------
 1 files changed, 282 insertions(+), 141 deletions(-)

diff --git a/src/router/index.js b/src/router/index.js
index 8175b50..0a1b4df 100644
--- a/src/router/index.js
+++ b/src/router/index.js
@@ -1,149 +1,290 @@
-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: [
-    // 鍦ㄤ富妗嗘灦鍐�
+import { createRouter, createWebHashHistory, createWebHistory } from 'vue-router'
+import HomeView from '../views/home/index.vue'
+import aboutUs from '../views/aboutUs/index.vue'
+import bookStore from '../views/bookStore/index.vue'
+import bookdetail from '../views/bookStore/detail.vue'
+import PageLayout from '../layout/baseLayout.vue'
+const router = createRouter({
+  history: createWebHashHistory(import.meta.env.BASE_URL),
+  routes: [
     {
-      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, // 鏄惁闇�瑕佺紦瀛�
+      path: '/',
+      name: 'layout',
+      component: PageLayout,
+      redirect: { name: 'home' },
+      children: [
+        {
+          path: '/home',
+          name: 'home',
+          component: HomeView,
         },
-        component: Home,
-      },
-      {
-        path: "search",
-        name: "search",
-        meta: {
-          name: "棣栭〉鎼滅储",
-          authentication: false, // 鏄惁闇�瑕佺櫥褰曢獙璇�
-          keepAlive: true, // 鏄惁闇�瑕佺紦瀛�
+        {
+          path: '/aboutUs',
+          name: 'aboutUs',
+          component: aboutUs,
         },
-        component: Search,
-      },
+        {
+          path: '/bookdetail',
+          name: 'bookdetail',
+          component: bookdetail,
+          meta: {
+            scrollToTop: true,
+          },
+        },
+        {
+          path: '/search',
+          name: 'search',
+          meta: {
+            name: '鎼滅储',
+          },
+          component: () => import('@/views/home/search.vue'),
+        },
+        {
+          path: '/bookStore',
+          name: 'bookStore',
+          component: bookStore,
+          meta: {
+            scrollToTop: true,
+          },
+        },
+        {
+          path: '/textBookApply',
+          name: 'textBookApply',
+          component: () => import('@/views/bookStore/textBookApply.vue'),
+          meta: {
+            scrollToTop: true,
+          },
+        },
+        //涓汉涓績
+        {
+          path: '/personalCenter',
+          name: 'personalCenter',
+          redirect: '/userInfo',
+          meta: {
+            name: '涓汉涓績',
+          },
+          component: () => import('@/views/personalCenter/index.vue'),
+          children: [
+            {
+              path: '/userInfo',
+              name: 'userInfo',
+              meta: {
+                name: '璐︽埛淇℃伅',
+              },
+              component: () => import('@/views/personalCenter/userInfo.vue'),
+            },
+            {
+              path: '/myCart',
+              name: 'myCart',
+              meta: {
+                name: '璐墿杞�',
+              },
+              component: () => import('@/views/personalCenter/myCart.vue'),
+            },
+            {
+              path: '/myBook',
+              name: 'myBook',
+              meta: {
+                name: '涔︽灦',
+              },
+              component: () => import('@/views/personalCenter/myBook.vue'),
+            },
+            {
+              path: '/myCourse',
+              name: 'myCourse',
+              meta: {
+                name: '璇剧▼',
+              },
+              component: () => import('@/views/personalCenter/course.vue'),
+            },
+            {
+              path: '/myClass',
+              name: 'myClass',
+              meta: {
+                name: '鐝骇',
+              },
+              component: () => import('@/views/personalCenter/class.vue'),
+            },
+            {
+              path: '/myOrder',
+              name: 'myOrder',
+              meta: {
+                name: '璁㈠崟',
+              },
+              component: () => import('@/views/personalCenter/myOrder.vue'),
+            },
+            {
+              path: '/myApply',
+              name: 'myApply',
+              meta: {
+                name: '鐢宠',
+              },
+              component: () => import('@/views/personalCenter/myApply.vue'),
+            },
+            {
+              path: '/myCollection',
+              name: 'myCollection',
+              meta: {
+                name: '鏀惰棌',
+              },
+              component: () => import('@/views/personalCenter/myCollection.vue'),
+            },
+            {
+              path: '/myMessage',
+              name: 'myMessage',
+              meta: {
+                name: '娑堟伅',
+              },
+              component: () => import('@/views/personalCenter/myMessage.vue'),
+            },
+            {
+              path: '/activateProduct',
+              name: 'activateProduct',
+              meta: {
+                name: '婵�娲荤爜',
+              },
+              component: () => import('@/views/personalCenter/activeCode.vue'),
+            },
+            {
+              path: '/courseDetail',
+              name: 'courseDetail',
+              meta: {
+                name: '璇剧▼璇︽儏',
+              },
+              component: () => import('@/views/courseManage/index.vue'),
+            },
+          ],
+        },
+        // 鐝骇
+        {
+          path: '/classManage',
+          name: 'classManage',
+          redirect: '/classHome',
+          meta: {
+            name: '鐝骇绠$悊',
+          },
+          component: () => import('../views/classManage/index.vue'),
+          children: [
+            {
+              path: '/classHome',
+              name: 'classHome',
+              meta: {
+                name: '鐝骇棣栭〉',
+              },
+              component: () => import('@/views/classManage/classHome.vue'),
+            },
+            {
+              path: '/studentManage',
+              name: 'studentManage',
+              meta: {
+                name: '瀛︾敓绠$悊',
+              },
+              component: () => import('@/views/classManage/studentManage.vue'),
+            },
+            {
+              path: '/teachingPlan',
+              name: 'teachingPlan',
+              meta: {
+                name: '鏁欏璁″垝',
+              },
+              component: () => import('@/views/classManage/teachingPlan.vue'),
+            },
+            {
+              path: '/prepareLessons',
+              name: 'prepareLessons',
+              meta: {
+                name: '澶囪',
+              },
+              component: () => import('@/views/classManage/prepareLessons.vue'),
+            },
+            {
+              path: '/jobManage',
+              name: 'jobManage',
+              meta: {
+                name: '浣滀笟绠$悊-鏁欏笀',
+              },
+              component: () => import('@/views/classManage/jobManage.vue'),
+            },
+            {
+              path: '/studentJob',
+              name: 'studentJob',
+              meta: {
+                name: '浣滀笟绠$悊-瀛︾敓',
+              },
+              component: () => import('@/views/classManage/studentJob.vue'),
+            },
+            {
+              path: '/jobDetail',
+              name: 'jobDetail',
+              meta: {
+                name: '浣滀笟绠$悊璇︽儏',
+              },
+              component: () => import('@/views/classManage/jobDetail.vue'),
+            },
+            {
+              path: '/testManage',
+              name: 'testManage',
+              meta: {
+                name: '娴嬭瘯绠$悊',
+              },
+              component: () => import('@/views/classManage/testManage.vue'),
+            },
+            {
+              path: '/jobAnalysis',
+              name: 'jobAnalysis',
+              meta: {
+                name: '浣滀笟鍒嗘瀽',
+              },
+              component: () => import('@/views/classManage/jobAnalysis.vue'),
+            },
+            {
+              path: '/teachInteraction',
+              name: 'teachInteraction',
+              meta: {
+                name: '鏁欏浜掑姩',
+              },
+              component: () => import('@/views/classManage/teachInteraction.vue'),
+            },
+            {
+              path: '/interactionDetail',
+              name: 'interactionDetail',
+              meta: {
+                name: '鏁欏浜掑姩-璇︽儏',
+              },
+              component: () => import('@/views/classManage/interactionDetail.vue'),
+            },
+            {
+              path: '/talkingPoint',
+              name: 'talkingPoint',
+              meta: {
+                name: '璇濋',
+              },
+              component: () => import('@/views/classManage/talkingPoint.vue'),
+            },
+            {
+              path: '/talkDetail',
+              name: 'talkDetail',
+              meta: {
+                name: '璇濋',
+              },
+              component: () => import('@/views/classManage/talkDetail.vue'),
+            },
+            {
+              path: '/info',
+              name: 'info',
+              meta: {
+                name: '鐝骇閫氱煡鍒楄〃',
+              },
+              component: () => import('@/views/classManage/infoList.vue'),
+            },
+          ],
+        },
       ],
     },
-    {
-      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: "鐧诲綍",
+  scrollBehavior(to, from, savedPosition) {
+    return { x: 0, y: 0 }
   },
-  component: () => import("@/views/login/findPassword"),
-},
-];
+})
 
-const router = new VueRouter({
-  routes,
-});
-
-export default router;
\ No newline at end of file
+export default router

--
Gitblit v1.9.1