From a4eab941885110b37022c79eba3f4f752461fba8 Mon Sep 17 00:00:00 2001 From: 疯狂的狮子Li <15040126243@163.com> Date: 星期五, 24 一月 2025 11:17:48 +0800 Subject: [PATCH] fix 修复 选择用户列表数据未清除问题 --- src/utils/request.ts | 10 ++++++++-- 1 files changed, 8 insertions(+), 2 deletions(-) diff --git a/src/utils/request.ts b/src/utils/request.ts index f2a69f0..9682b81 100644 --- a/src/utils/request.ts +++ b/src/utils/request.ts @@ -10,6 +10,7 @@ import { getLanguage } from '@/lang'; import { encryptBase64, encryptWithAes, generateAesKey, decryptWithAes, decryptBase64 } from '@/utils/crypto'; import { encrypt, decrypt } from '@/utils/jsencrypt'; +import router from '@/router'; const encryptHeader = 'encrypt-key'; let downloadLoadingInstance: LoadingInstance; @@ -134,8 +135,13 @@ }).then(() => { isRelogin.show = false; useUserStore().logout().then(() => { - location.href = import.meta.env.VITE_APP_CONTEXT_PATH + 'index'; - }); + router.replace({ + path: '/login', + query: { + redirect: encodeURIComponent(router.currentRoute.value.fullPath || '/') + } + }) + }); }).catch(() => { isRelogin.show = false; }); -- Gitblit v1.9.3