From 845b848b60cd2356d9cf3b9d13c51595babaf72c Mon Sep 17 00:00:00 2001 From: 玲娜贝er <15891557205@163.com> Date: 星期三, 27 十一月 2024 15:39:34 +0800 Subject: [PATCH] !159 eslint升级v9版本 * update: eslint升级v9版本 & 更新一些不符合校验规则的代码 --- 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