Files
hongshu-web/src/api/im.ts

75 lines
1.5 KiB
TypeScript
Raw Normal View History

2024-07-03 16:56:33 +08:00
import request from "@/utils/request";
/**
*
* @returns
*/
export const getCountMessage = () => {
return request<any>({
url: "/web/im/chat/getCountMessage", // mock接口
method: "get",
});
};
/**
*
* @returns
*/
export const getChatUserList = () => {
return request<any>({
url: "/web/im/chat/getChatUserList", // mock接口
method: "get",
});
};
/**
*
* @param sendUid id
* @param type
* @returns success
*/
export const clearMessageCount = (sendUid:string,type:number) => {
return request<any>({
url: "/web/im/chat/clearMessageCount", // mock接口
method: "get",
params:{
sendUid,
type
}
});
};
/**
*
* @param currentPage
* @param pageSize
* @param acceptUid id
* @returns
*/
export const getAllChatRecord = (
currentPage: number,
pageSize: number,
acceptUid: string
) => {
return request<any>({
url: `/web/im/chat/getAllChatRecord/${currentPage}/${pageSize}`, // mock接口
method: "get",
params: {
acceptUid,
},
});
};
/**
*
* @param data
* @returns success
*/
export const sendMsg = (data: any) => {
return request<any>({
url: "/web/im/chat/sendMsg", // mock接口
method: "post",
data: data,
});
};