From a7fb2f5eab3e548f040004c1019f1c994eb91ad4 Mon Sep 17 00:00:00 2001
From: chenyc <501753378@qq.com>
Date: 星期二, 09 十二月 2025 14:44:36 +0800
Subject: [PATCH] 日常更新

---
 src/router/index.ts |   25 +++----------------------
 1 files changed, 3 insertions(+), 22 deletions(-)

diff --git a/src/router/index.ts b/src/router/index.ts
index ecffb7a..64878ab 100644
--- a/src/router/index.ts
+++ b/src/router/index.ts
@@ -4,33 +4,14 @@
 import { Session } from '@/utils/storage'
 
 const routes: Array<RouteRecordRaw> = [
-    // { path: '/', name: 'Home', component: () => import('@/views/home/index.vue')},
-    { path: '/', name: 'test', component: () => import('@/views/home/index.vue')},
-    { path: '/test', name: 'Home', component: () => import('@/views/test/index.vue')},
-    { path: '/login', name: 'login', component: () => import('@/views/login/index.vue')},
+    { path: '/', name: 'Home', component: () => import('@/views/home/index.vue')},
+    // { path: '/', name: 'Home', component: () => import('@/views/home/index3.vue')},
+    // { path: '/', name: 'login', component: () => import('@/views/login/index.vue')},
 ]
 
 const router = createRouter({
     history: createWebHashHistory(),    // history 模式则使用 createWebHistory()
     routes,
 })
-// 路由加载前
-// router.beforeEach(async(to, from, next) => {
-//     // console.log(to, 'to')
-//     const token = Session.get('token')
-//     if (to.path === '/login' && !token) {
-//         next()
-//     }
-//     else {
-//         if (!token||to.path === '/login') {
-//             console.log('如果toke为空,就定位到登录页')
-//             next('/test')
-//             Session.clear()
-//         } else {
-//             next()
-//         }
-        
-//     }
-// })
 
 export default router
\ No newline at end of file

--
Gitblit v1.8.0