fix(admin-web): 修复申请照片页面响应解包多余一层导致数据为空
apiClient 响应拦截器已返回 response.data,页面不应再取 .data Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
a801a46e76
commit
af2afeda56
|
|
@ -60,7 +60,8 @@ export default function AuthorizationPhotosPage() {
|
||||||
const response = await apiClient.get(API_ENDPOINTS.AUTHORIZATION.SELF_APPLY_PHOTOS, {
|
const response = await apiClient.get(API_ENDPOINTS.AUTHORIZATION.SELF_APPLY_PHOTOS, {
|
||||||
params,
|
params,
|
||||||
});
|
});
|
||||||
setData((response as any)?.data ?? { items: [], total: 0, page: 1, limit: 20 });
|
// apiClient 响应拦截器已经解包 response.data,这里直接用 response
|
||||||
|
setData((response as any) ?? { items: [], total: 0, page: 1, limit: 20 });
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
console.error('获取自助申请照片失败:', err);
|
console.error('获取自助申请照片失败:', err);
|
||||||
setError(err instanceof Error ? err.message : '获取数据失败');
|
setError(err instanceof Error ? err.message : '获取数据失败');
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue