From 83939b7517fe63bfc7d61d0053ec8717ecd3153f Mon Sep 17 00:00:00 2001 From: liweijie0812 <674416404@qq.com> Date: Fri, 2 Jun 2023 16:03:02 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20204=E6=97=A0=E5=86=85=E5=AE=B9=E7=9B=B4?= =?UTF-8?q?=E6=8E=A5=E8=BF=94=E5=9B=9E=E5=88=A4=E6=96=AD=20(#539)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/utils/request/index.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/utils/request/index.ts b/src/utils/request/index.ts index e2da3cc..386d67a 100644 --- a/src/utils/request/index.ts +++ b/src/utils/request/index.ts @@ -23,7 +23,7 @@ const transform: AxiosTransform = { // 如果204无内容直接返回 const method = res.config.method?.toLowerCase(); - if (res.status === 204 || method === 'put' || method === 'patch') { + if (res.status === 204 && ['put', 'patch', 'delete'].includes(method)) { return res; }