From fd82dfc5e0a845da0cc0c8824b389fd68f27990e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=B6=85=E7=BA=A7=E8=80=81=E7=99=BD=E5=85=94?= Date: Tue, 2 Sep 2025 15:27:55 +0800 Subject: [PATCH] =?UTF-8?q?fix(ChatWindow):=20=E4=BF=AE=E5=A4=8D=E8=81=8A?= =?UTF-8?q?=E5=A4=A9=E7=AA=97=E5=8F=A3=E6=B6=88=E6=81=AF=E8=AF=B7=E6=B1=82?= =?UTF-8?q?=E5=8F=82=E6=95=B0=E9=94=99=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 调整了消息请求的参数逻辑,将时间戳改为固定值并修正了群聊和私聊的参数判断条件 --- .../src/pages/pc/ckbox/components/ChatWindow/index.tsx | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) 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 => {