From a5b57908ec13811dcaafd2992dac8dad3c425060 Mon Sep 17 00:00:00 2001 From: xiaoxian521 <1923740402@qq.com> Date: Mon, 15 Apr 2024 11:40:15 +0800 Subject: [PATCH] =?UTF-8?q?perf:=20=E4=BC=98=E5=8C=96=E8=AF=B7=E6=B1=82?= =?UTF-8?q?=E7=99=BD=E5=90=8D=E5=8D=95=E9=80=BB=E8=BE=91=EF=BC=8C=E5=85=BC?= =?UTF-8?q?=E5=AE=B9=E6=9B=B4=E5=A4=9A=E5=9C=BA=E6=99=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/utils/http/index.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/utils/http/index.ts b/src/utils/http/index.ts index 5f40e6969..594a8bc96 100644 --- a/src/utils/http/index.ts +++ b/src/utils/http/index.ts @@ -74,7 +74,7 @@ class PureHttp { } /** 请求白名单,放置一些不需要token的接口(通过设置请求白名单,防止token过期后再请求造成的死循环问题) */ const whiteList = ["/refresh-token", "/login"]; - return whiteList.find(url => url === config.url) + return whiteList.some(url => config.url.endsWith(url)) ? config : new Promise(resolve => { const data = getToken();