From 8f1c703e895a937c28642aaff6ebda116495ae64 Mon Sep 17 00:00:00 2001 From: dap <15891557205@163.com> Date: Wed, 30 Jul 2025 17:33:33 +0800 Subject: [PATCH] =?UTF-8?q?update:=20=E5=BE=AE=E6=9C=8D=E5=8A=A1=E4=B8=8E?= =?UTF-8?q?=E5=8D=95=E4=BD=93=20=E4=B8=8D=E5=85=BC=E5=AE=B9=E5=9C=B0?= =?UTF-8?q?=E6=96=B9=E8=AF=B4=E6=98=8E?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/web-antd/src/api/request.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/apps/web-antd/src/api/request.ts b/apps/web-antd/src/api/request.ts index acb7a6d3..6c60b608 100644 --- a/apps/web-antd/src/api/request.ts +++ b/apps/web-antd/src/api/request.ts @@ -165,6 +165,10 @@ function createRequestClient(baseURL: string) { // 不进行任何处理,直接返回 // 用于页面代码可能需要直接获取code,data,message这些信息时开启 if (!isTransformResponse) { + /** + * @warning 注意 微服务版本在401(网关)会返回text/plain的头 所以这里代码会无效 + * 我建议你改后端而不是前端来做兼容 + */ // json数据的判断 if (response.headers['content-type']?.includes?.('application/json')) { /**