diff --git a/Cunkebao/src/pages/pc/ckbox/components/ChatWindow/index.tsx b/Cunkebao/src/pages/pc/ckbox/components/ChatWindow/index.tsx index 27cf32bc..4ef790a3 100644 --- a/Cunkebao/src/pages/pc/ckbox/components/ChatWindow/index.tsx +++ b/Cunkebao/src/pages/pc/ckbox/components/ChatWindow/index.tsx @@ -60,17 +60,19 @@ const ChatWindow: React.FC = ({ 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 => {