优化了消息数量,筛选和顶部部分

This commit is contained in:
yml2213
2026-06-13 19:03:29 +08:00
parent 3b4cd76e42
commit 9d7184ecde
12 changed files with 223 additions and 12 deletions
+10
View File
@@ -52,6 +52,16 @@ export async function fetchChats(page = 1, pageSize = 20) {
return data.data
}
export async function fetchUnreadChatCount() {
const { data } = await apiClient.get<ApiResponse<{ unread_count: number }>>(
'/chats/unread-count',
{
silent: true,
}
)
return data.data.unread_count
}
export async function fetchChat(id: number) {
const { data } = await apiClient.get<ApiResponse<ChatConversation>>(`/chats/${id}`)
return data.data