Browse Source

优化语音功能

master
xie.bx 3 years ago
parent
commit
57ad2a6222
  1. 11
      im-ui/src/store/chatStore.js

11
im-ui/src/store/chatStore.js

@ -84,7 +84,16 @@ export default {
break; 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.lastSendTime = msgInfo.sendTime;
chat.messages.push(msgInfo); chat.messages.push(msgInfo);
// 如果不是当前会话,未读加1 // 如果不是当前会话,未读加1

Loading…
Cancel
Save