From ace0cfcd61927780dda4bd4a86c7b742ce9d48c2 Mon Sep 17 00:00:00 2001
From: chenyc <501753378@qq.com>
Date: 星期五, 08 八月 2025 21:38:57 +0800
Subject: [PATCH] gx
---
src/router/index.ts | 22 +++++++++++++---------
1 files changed, 13 insertions(+), 9 deletions(-)
diff --git a/src/router/index.ts b/src/router/index.ts
index 041d7f3..4c93bc9 100644
--- a/src/router/index.ts
+++ b/src/router/index.ts
@@ -36,18 +36,22 @@
document.title = to.meta.title
}
// 看看有没有toke
- const token = Session.get('token');
- console.log(!token)
+ const token = Session.get('token')
+ console.log(!token)
if (to.path === '/login') {
- next();
-
- }else{
+ next()
+
+ } else {
if (!token){
- next('/login');
- }else{
+ next('/login')
+ } else {
console.log('---')
- await userInfo.setPatientApi()
- next();
+ if (to.path === '/'){
+ await userInfo.setPatientApi()
+
+ await userInfo.setPatientApi()
+ }
+ next()
}
}
})
--
Gitblit v1.8.0