From dfc249221fd9eb8ca0846ce52a1d0aa9411bd3be Mon Sep 17 00:00:00 2001 From: Lei OT Date: Wed, 20 Mar 2024 09:45:15 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E5=8E=86=E5=8F=B2=E8=AE=B0=E5=BD=95:=20?= =?UTF-8?q?=E6=98=BE=E7=A4=BA=E5=8F=91=E9=80=81=E4=BA=BA=E5=90=8D=E5=AD=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/actions/ConversationActions.js | 1 + src/views/ChatHistory.jsx | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/actions/ConversationActions.js b/src/actions/ConversationActions.js index fe5295d..0905970 100644 --- a/src/actions/ConversationActions.js +++ b/src/actions/ConversationActions.js @@ -87,6 +87,7 @@ export const fetchConversationsSearch = async (params) => { ...ele, customer_name: `${ele.whatsapp_name || ''}`.trim(), whatsapp_name: `${ele.whatsapp_name || ''}`.trim(), + opi_sn: ele.OPI_SN || ele.opi_sn || 0, OPI_Name: `${ele.OPI_Name || ''}`.trim(), matchMsgList: parseRenderMessageList((ele.msglist_AsJOSN || [])), // .reverse()), })); diff --git a/src/views/ChatHistory.jsx b/src/views/ChatHistory.jsx index 3b9cbbd..a93a612 100644 --- a/src/views/ChatHistory.jsx +++ b/src/views/ChatHistory.jsx @@ -150,10 +150,10 @@ function ChatHistory() { setChatItemMessages([]); setParamsForMsgList({}); setSelectedMatch({}); - if (isEmpty(selectedConversation.conversationid)) { + if (isEmpty(selectedConversation.conversationid) || isEmpty(selectedConversation.opi_sn)) { return () => {}; } - const firstActionPageParams = { opisn: selectedConversation.OPI_SN, whatsappid: selectedConversation.whatsapp_phone_number }; + const firstActionPageParams = { opisn: selectedConversation.opi_sn, whatsappid: selectedConversation.whatsapp_phone_number }; if (isEmpty(selectedConversation.matchMsgList)) { firstActionPageParams.loadPrePage = false; firstActionPageParams.loadNextPage = true;