fix(ChatWindow): 修复聊天窗口消息请求参数错误
调整了消息请求的参数逻辑,将时间戳改为固定值并修正了群聊和私聊的参数判断条件
This commit is contained in:
@@ -60,17 +60,19 @@ const ChatWindow: React.FC<ChatWindowProps> = ({
|
||||
|
||||
useEffect(() => {
|
||||
setLoading(true);
|
||||
console.log(contract);
|
||||
|
||||
const params: any = {
|
||||
wechatAccountId: contract.wechatAccountId,
|
||||
From: 1,
|
||||
To: +new Date() + 1000,
|
||||
To: 4704624000000,
|
||||
Count: 100,
|
||||
olderData: true,
|
||||
};
|
||||
if (contract.groupId == 1) {
|
||||
params.wechatFriendId = contract.id;
|
||||
if (contract.chatroomId) {
|
||||
params.wechatChatroomId = contract.chatroomId;
|
||||
} else {
|
||||
params.wechatChatroomId = contract.id;
|
||||
params.wechatFriendId = contract.id;
|
||||
}
|
||||
getChatMessages(params)
|
||||
.then(msg => {
|
||||
|
||||
Reference in New Issue
Block a user