From b2a415728547d5aa0fa77f5653ddb7b8e6a5a8a2 Mon Sep 17 00:00:00 2001 From: 疯狂的狮子Li <15040126243@163.com> Date: 星期五, 24 一月 2025 13:08:48 +0800 Subject: [PATCH] !175 发布 5.3.0 新春版 祝大家新年快乐 Merge pull request !175 from 疯狂的狮子Li/dev --- 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