feat(ctrt): 完成 CTRT-01~03 响应契约统一 - 三端拦截器+portal_token清理+调用点适配

This commit is contained in:
Simon
2026-07-07 22:56:49 +08:00
parent d56a9a6079
commit 6f0fbbb066
48 changed files with 6183 additions and 613 deletions
+6 -6
View File
@@ -33,7 +33,7 @@ export async function recallMessage(messageId: string): Promise<any> {
const response: AxiosResponse = await apiClient.post(
`/messages/${messageId}/recall`
)
return response.data
return response
}
/**
@@ -46,7 +46,7 @@ export async function deleteMessage(messageId: string): Promise<any> {
const response: AxiosResponse = await apiClient.delete(
`/messages/${messageId}`
)
return response.data
return response
}
/**
@@ -59,7 +59,7 @@ export async function markConversationRead(conversationId: string): Promise<any>
const response: AxiosResponse = await apiClient.post(
`/conversations/${conversationId}/mark-read`
)
return response.data
return response
}
/**
@@ -77,7 +77,7 @@ export async function pollMessages(afterMessageId?: string): Promise<Message[]>
'/h5/conversations/current/messages/poll',
{ params }
)
const data = response.data.data
const data = response
const items = data?.items || []
// 映射后端字段到前端字段
return items.map((item: any) => ({
@@ -121,7 +121,7 @@ export async function uploadImage(file: File): Promise<{
},
}
)
return response.data.data
return response
}
/**
@@ -148,5 +148,5 @@ export async function uploadMessageFile(file: File): Promise<{
},
}
)
return response.data.data
return response
}