fix(admin): 修复授权照片代理未解包全局响应拦截器的问题

authorization-service 全局拦截器将响应包装为 {success, data, timestamp},
代理服务需要从 response.data.data 取实际数据,而非 response.data。

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
hailin 2026-03-02 22:50:52 -08:00
parent 0576733579
commit a801a46e76
1 changed files with 4 additions and 1 deletions

View File

@ -77,7 +77,10 @@ export class AuthorizationProxyService {
const url = `/api/v1/authorization/self-apply-photos?${queryParams.toString()}`; const url = `/api/v1/authorization/self-apply-photos?${queryParams.toString()}`;
this.logger.debug(`[getSelfApplyPhotos] 请求: ${url}`); this.logger.debug(`[getSelfApplyPhotos] 请求: ${url}`);
const response = await this.httpClient.get(url); const response = await this.httpClient.get(url);
const data = response.data; // authorization-service 全局拦截器将响应包装为 {success, data, timestamp}
// 实际数据在 response.data.data 中
const raw = response.data;
const data = raw?.data ?? raw;
if (!data?.items?.length) { if (!data?.items?.length) {
return { items: [], total: data?.total ?? 0, page, limit }; return { items: [], total: data?.total ?? 0, page, limit };