From e220a11760bb56f12da82a18e0b441dfdc588fac Mon Sep 17 00:00:00 2001
From: zhouwenxuan <1175765986@qq.com>
Date: Thu, 07 Dec 2023 15:30:25 +0800
Subject: [PATCH] bug修改
---
src/utils/request.js | 14 ++++++++------
1 files changed, 8 insertions(+), 6 deletions(-)
diff --git a/src/utils/request.js b/src/utils/request.js
index a782727..7806b7b 100644
--- a/src/utils/request.js
+++ b/src/utils/request.js
@@ -1,6 +1,6 @@
import axios from 'axios'
import { ElNotification , ElMessageBox, ElMessage, ElLoading } from 'element-plus'
-import { getToken } from '@/utils/auth'
+import {getToken, removeToken} from '@/utils/auth'
import errorCode from '@/utils/errorCode'
import { tansParams, blobValidate } from '@/utils/ruoyi'
import cache from '@/plugins/cache'
@@ -87,11 +87,13 @@
isRelogin.show = true;
ElMessageBox.confirm('登录状态已过期,您可以继续留在该页面,或者重新登录', '系统提示', { confirmButtonText: '重新登录', cancelButtonText: '取消', type: 'warning' }).then(() => {
isRelogin.show = false;
- useUserStore().logOut().then(() => {
- // router.push('/homePage')
-
- location.href = '/homePage';
- })
+ removeToken()
+ location.href = '/homePage';
+ // useUserStore().logOut().then(() => {
+ // // router.push('/homePage')
+ //
+ // location.href = '/homePage';
+ // })
}).catch(() => {
isRelogin.show = false
});
--
Gitblit v1.9.2