fix(admin-web): 修复划转记录页面报错问题
- 适配后端返回格式: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 <noreply@anthropic.com>
This commit is contained in:
parent
230e0d98b6
commit
06fc8aa5d9
|
|
@ -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 };
|
||||
},
|
||||
|
||||
/**
|
||||
|
|
|
|||
Loading…
Reference in New Issue