diff --git a/frontend/admin-web/src/services/pendingActionService.ts b/frontend/admin-web/src/services/pendingActionService.ts index fff8f15b..c36f36e0 100644 --- a/frontend/admin-web/src/services/pendingActionService.ts +++ b/frontend/admin-web/src/services/pendingActionService.ts @@ -24,16 +24,17 @@ export const pendingActionService = { * 查询待办操作列表 */ async getList(params: QueryPendingActionsParams = {}): Promise { - const response = await apiClient.get(API_ENDPOINTS.PENDING_ACTIONS.LIST, { params }); - return response.data; + // apiClient 拦截器已返回 response.data,这里直接返回 + const data = await apiClient.get(API_ENDPOINTS.PENDING_ACTIONS.LIST, { params }); + return (data as { data: PendingActionListResponse }).data; }, /** * 获取单个待办操作详情 */ async getDetail(id: string): Promise { - const response = await apiClient.get(API_ENDPOINTS.PENDING_ACTIONS.DETAIL(id)); - return response.data; + const data = await apiClient.get(API_ENDPOINTS.PENDING_ACTIONS.DETAIL(id)); + return (data as { data: PendingAction }).data; }, /** @@ -41,7 +42,7 @@ export const pendingActionService = { */ async create(data: CreatePendingActionRequest): Promise { const response = await apiClient.post(API_ENDPOINTS.PENDING_ACTIONS.CREATE, data); - return response.data; + return (response as { data: PendingAction }).data; }, /** @@ -49,7 +50,7 @@ export const pendingActionService = { */ async batchCreate(data: BatchCreatePendingActionRequest): Promise { const response = await apiClient.post(API_ENDPOINTS.PENDING_ACTIONS.BATCH_CREATE, data); - return response.data; + return (response as { data: BatchCreateResult }).data; }, /** @@ -57,7 +58,7 @@ export const pendingActionService = { */ async update(id: string, data: UpdatePendingActionRequest): Promise { const response = await apiClient.put(API_ENDPOINTS.PENDING_ACTIONS.UPDATE(id), data); - return response.data; + return (response as { data: PendingAction }).data; }, /** @@ -65,7 +66,7 @@ export const pendingActionService = { */ async cancel(id: string): Promise { const response = await apiClient.post(API_ENDPOINTS.PENDING_ACTIONS.CANCEL(id)); - return response.data; + return (response as { data: PendingAction }).data; }, /**