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; }