feat(wechat): 实现微信聊天状态管理及消息处理功能
添加微信聊天状态管理store,包含联系人管理、消息发送/接收、未读消息计数等功能 修复聊天窗口参数传递问题,统一使用contract.id作为标识 调整消息加载数量从10条减少到5条
This commit is contained in:
@@ -38,7 +38,7 @@ const MessageEnter: React.FC<MessageEnterProps> = ({
|
||||
console.log("发送消息", contract);
|
||||
const params = {
|
||||
wechatAccountId: contract.wechatAccountId,
|
||||
wechatChatroomId: contract?.chatroomId || 0,
|
||||
wechatChatroomId: contract?.chatroomId ? contract.id : 0,
|
||||
wechatFriendId: contract?.chatroomId ? 0 : contract.id,
|
||||
msgSubType: 0,
|
||||
msgType: 1,
|
||||
|
||||
@@ -64,11 +64,11 @@ const ChatWindow: React.FC<ChatWindowProps> = ({
|
||||
wechatAccountId: contract.wechatAccountId,
|
||||
From: 1,
|
||||
To: 4704624000000,
|
||||
Count: 10,
|
||||
Count: 5,
|
||||
olderData: true,
|
||||
};
|
||||
if (contract.chatroomId) {
|
||||
params.wechatChatroomId = contract.chatroomId;
|
||||
params.wechatChatroomId = contract.id;
|
||||
} else {
|
||||
params.wechatFriendId = contract.id;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user