From 57ad2a622222fef56b5cc7d34156c8bf4a111d0b Mon Sep 17 00:00:00 2001 From: "xie.bx" Date: Wed, 9 Nov 2022 17:46:09 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E8=AF=AD=E9=9F=B3=E5=8A=9F?= =?UTF-8?q?=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- im-ui/src/store/chatStore.js | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/im-ui/src/store/chatStore.js b/im-ui/src/store/chatStore.js index 9328c18..ca1debf 100644 --- a/im-ui/src/store/chatStore.js +++ b/im-ui/src/store/chatStore.js @@ -84,7 +84,16 @@ export default { break; } } - chat.lastContent = msgInfo.type == 1 ? "[图片]" : msgInfo.type == 2 ? "[文件]" : msgInfo.content; + console.log(msgInfo.type) + if(msgInfo.type == 1){ + chat.lastContent = "[图片]"; + }else if(msgInfo.type == 2){ + chat.lastContent = "[文件]"; + }else if(msgInfo.type == 3){ + chat.lastContent = "[语音]"; + }else{ + chat.lastContent = msgInfo.content; + } chat.lastSendTime = msgInfo.sendTime; chat.messages.push(msgInfo); // 如果不是当前会话,未读加1