From 5d6c0e614bab737842e402077bee47a9d4e18733 Mon Sep 17 00:00:00 2001
From: chenyc <501753378@qq.com>
Date: 星期五, 14 十一月 2025 14:47:39 +0800
Subject: [PATCH] gx密码输入提示
---
src/router/index.ts | 13 ++++++++-----
1 files changed, 8 insertions(+), 5 deletions(-)
diff --git a/src/router/index.ts b/src/router/index.ts
index 23e9128..a195337 100644
--- a/src/router/index.ts
+++ b/src/router/index.ts
@@ -8,6 +8,7 @@
import { Session } from '@/utils/storage'
const routes: Array<RouteRecordRaw> = [
+ { path: '/HomeLoading', name: 'HomeLoading', component: () => import('views/HomeLoading/index.vue'),meta:{title:'胜透服务'}},
{ path: '/login', name: 'login', component: () => import('views/login/index.vue'),meta:{title:'登录'}},
{ path: '/', name: 'Home', component: () => import('views/home/index.vue'),meta:{title:'首页'}},
{ path: '/my', name: 'myMine', component: () => import('views/myMine/index.vue'),meta:{title:'我的'}},
@@ -38,18 +39,20 @@
}
// 看看有没有toke
const token = Session.get('token')
- console.log(!token)
- if (to.path === '/login') {
+ console.log(token,'token查看')
+ if (to.path === '/login'|| to.path === '/HomeLoading'){
+ console.log('进入了登录也或者是初始化页')
next()
} else {
+ console.log('不是登录页')
if (!token){
+ console.log('没有token,去登录')
next('/login')
} else {
- console.log('---')
+ console.log('有token,就随便看看')
if (to.path === '/'){
- await userInfo.setPatientApi()
-
+ console.log('去首页,设置患者信息')
await userInfo.setPatientApi()
}
next()
--
Gitblit v1.8.0