diff --git a/src/api/im/message/index.ts b/src/api/im/message/index.ts index d8a9a54d..a127aa43 100644 --- a/src/api/im/message/index.ts +++ b/src/api/im/message/index.ts @@ -26,17 +26,22 @@ export interface ImMessageRespVO { sequence: number // 序号 } +export interface pullParams { + sequence: number + size: number +} + // 发送消息 -export const sendMessage = async (data: ImMessageSendReqVO) => { +export const sendMessage = async (data: ImMessageSendReqVO): Promise => { return await request.post({ url: `/im/message/send`, data }) } // 消息列表-拉取大于 sequence 的消息列表 -export const pullMessageList = async (params: { sequence: number; size: number }) => { +export const pullMessageList = async (params: pullParams): Promise => { return await request.get({ url: `/im/message/pull`, params }) } // 消息列表-根据接收人和发送时间进行分页查询 -export const getMessageList = async (params: any) => { +export const getMessageList = async (params: any): Promise => { return await request.get({ url: `/im/message/list`, params }) } diff --git a/src/layout/components/ImChat/src/ImChat.vue b/src/layout/components/ImChat/src/ImChat.vue index e3b92d73..164cd8a1 100644 --- a/src/layout/components/ImChat/src/ImChat.vue +++ b/src/layout/components/ImChat/src/ImChat.vue @@ -1,6 +1,7 @@