From 06fc8aa5d926ad853b4f9b43583e993cba0caadc Mon Sep 17 00:00:00 2001 From: hailin Date: Wed, 7 Jan 2026 04:28:07 -0800 Subject: [PATCH] =?UTF-8?q?fix(admin-web):=20=E4=BF=AE=E5=A4=8D=E5=88=92?= =?UTF-8?q?=E8=BD=AC=E8=AE=B0=E5=BD=95=E9=A1=B5=E9=9D=A2=E6=8A=A5=E9=94=99?= =?UTF-8?q?=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 适配后端返回格式:orders -> items, pageSize -> limit - 解决 Cannot read properties of undefined (reading 'length') 错误 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 --- .../admin-web/src/services/systemWithdrawalService.ts | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/frontend/admin-web/src/services/systemWithdrawalService.ts b/frontend/admin-web/src/services/systemWithdrawalService.ts index 9b928efb..afb747a0 100644 --- a/frontend/admin-web/src/services/systemWithdrawalService.ts +++ b/frontend/admin-web/src/services/systemWithdrawalService.ts @@ -34,7 +34,16 @@ export const systemWithdrawalService = { const response = await apiClient.get(API_ENDPOINTS.SYSTEM_WITHDRAWAL.ORDERS, { params }); // eslint-disable-next-line @typescript-eslint/no-explicit-any const result = (response as any)?.data?.data; - return result ?? { items: [], total: 0, page: 1, limit: 20 }; + // [2026-01-07] 适配后端返回格式:orders -> items, pageSize -> limit + if (result) { + return { + items: result.orders ?? [], + total: result.total ?? 0, + page: result.page ?? 1, + limit: result.pageSize ?? 20, + }; + } + return { items: [], total: 0, page: 1, limit: 20 }; }, /**