From 7c3d29107a0b2048e0dd86233723894db4afa567 Mon Sep 17 00:00:00 2001 From: bai <1643359946@qq.com> Date: Tue, 10 Oct 2023 19:48:27 +0800 Subject: [PATCH] =?UTF-8?q?2023=E5=B9=B410=E6=9C=8810=E6=97=A5=20=E5=B0=9D?= =?UTF-8?q?=E8=AF=95=E4=BF=AE=E5=A4=8D=E6=8E=A5=E5=8F=A3=E6=8A=A5=E9=94=99?= =?UTF-8?q?=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/utils/http/axios/index.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/utils/http/axios/index.ts b/src/utils/http/axios/index.ts index 285d426..d8d4a32 100644 --- a/src/utils/http/axios/index.ts +++ b/src/utils/http/axios/index.ts @@ -18,6 +18,8 @@ import { useErrorLogStoreWithOut } from '/@/store/modules/errorLog'; import { useI18n } from '/@/hooks/web/useI18n'; import { joinTimestamp, formatRequestDate } from './helper'; import { useUserStoreWithOut } from '/@/store/modules/user'; + +import { useSso } from '/@/hooks/web/useSso'; const globSetting = useGlobSetting(); const urlPrefix = globSetting.urlPrefix; const { createMessage, createErrorModal } = useMessage(); @@ -197,7 +199,8 @@ export const transform: AxiosTransform = { if (!error?.response?.status) {//找不到返回值,也找不到状态码,则认为是重定向后跨域了, //window.location.href = error?.config?.url || window.location.href;//跳转不正常。。。 - window.location.href = window.location.href; + //window.location.href = window.location.href; + useSso().ssoLoginOut(); } const { t } = useI18n();