From 6fcb03ee53cd34d21c5ab09b899a10a01d37be54 Mon Sep 17 00:00:00 2001 From: feige996 <1020102647@qq.com> Date: Wed, 29 Oct 2025 17:56:02 +0800 Subject: [PATCH] =?UTF-8?q?fix(http):=20=E4=BF=AE=E6=94=B9http=E8=AF=B7?= =?UTF-8?q?=E6=B1=82=E8=BF=94=E5=9B=9E=E6=95=B0=E6=8D=AE=E4=B8=BAresponseD?= =?UTF-8?q?ata.data?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 之前直接返回整个responseData,现在改为只返回data字段以符合业务需求 --- src/http/http.ts | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/http/http.ts b/src/http/http.ts index 851e2b0..2b736cd 100644 --- a/src/http/http.ts +++ b/src/http/http.ts @@ -101,8 +101,7 @@ export function http(options: CustomRequestOptions) { title: responseData.msg || responseData.message || '请求错误', }) } - // TODO: check 如果不满足业务要求,也可以改为 reject(responseData as T) - return resolve(responseData as T) + return resolve(responseData.data) } // 处理其他错误