This commit is contained in:
oneao committed 2025-06-18 16:30:01 +08:00
1 parent bcc4722efc
commit f48536774f
403 files changed
+34776

No files matched your search

@@ -0,0 +1,49 @@
import { httpPostJson } from "@/utils/http";
export interface GetChatsResult {
messageId?: string;
lastMessageTime?: string;
companyId: string;
companyName: string;
companyAvatar?: string;
isRollback?: number; // 0 正常,1撤回
noReadNumber?: number; // 0 未读 1已读
lastContent?: string;
lastContentType?: string;
}
export const getChatsApi = () => {
return httpPostJson<GetChatsResult[]>(`/imMessage/chats`);
};
export interface GetHistoryParams {
chatCompanyId: string;
}
export interface GetHistoryResult {
messageId: string;
sendId: string;
acceptId: string;
messageContent: string;
messageContentType: string;
isRollback: number;
quoteMessageId: string;
sendMessageTime: string;
}
export const getHistoryApi = (params: GetHistoryParams) => {
return httpPostJson<GetHistoryResult[]>(`/imMessage/history`, params);
};
export interface UpdateIsReadParams {
companyId: string;
}
export const updateIsReadApi = (params: UpdateIsReadParams) => {
return httpPostJson<null>(`/imMessage/updateIsRead`, params);
};
export interface GetAllNoReadNumberParams {}
export interface GetAllNoReadNumberResult {
noReadNumber: number;
}
export const getAllNoReadNumberApi = (params: GetAllNoReadNumberParams) => {
return httpPostJson<GetAllNoReadNumberResult>(`/imMessage/getAllNoReadNumber`, params);
};