From 4a8aa77aaa2496c603cd2d5e8f7077508b09e431 Mon Sep 17 00:00:00 2001 From: bai <1643359946@qq.com> Date: Tue, 10 Oct 2023 17:26:11 +0800 Subject: [PATCH] =?UTF-8?q?2023=E5=B9=B410=E6=9C=8810=E6=97=A5=20=E4=BF=AE?= =?UTF-8?q?=E6=94=B9=E9=83=A8=E5=88=86=E6=8E=A5=E5=8F=A3=E8=B7=B3=E8=BD=AC?= =?UTF-8?q?=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 | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/utils/http/axios/index.ts b/src/utils/http/axios/index.ts index e50a955..285d426 100644 --- a/src/utils/http/axios/index.ts +++ b/src/utils/http/axios/index.ts @@ -196,7 +196,8 @@ export const transform: AxiosTransform = { //console.log('报错了!',error,error.config,error.request,error.response,error.isAxiosError,error.toJSON(),); if (!error?.response?.status) {//找不到返回值,也找不到状态码,则认为是重定向后跨域了, - window.location.href = error?.config?.url || window.location.href; + //window.location.href = error?.config?.url || window.location.href;//跳转不正常。。。 + window.location.href = window.location.href; } const { t } = useI18n();