From b4ed65ee72131253fcca4adde388afab2431f3bb Mon Sep 17 00:00:00 2001 From: ch Date: Mon, 13 Jun 2022 22:15:38 +0800 Subject: [PATCH] =?UTF-8?q?fix:=E6=B6=88=E6=81=AF=E5=88=97=E8=A1=A8?= =?UTF-8?q?=E8=A7=A3=E6=9E=90=E5=BC=82=E5=B8=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/utils/msb-im.js | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/src/utils/msb-im.js b/src/utils/msb-im.js index 5d1c22c..5866b2c 100644 --- a/src/utils/msb-im.js +++ b/src/utils/msb-im.js @@ -2,7 +2,7 @@ * @Author: ch * @Date: 2022-05-18 14:54:47 * @LastEditors: ch - * @LastEditTime: 2022-06-13 21:53:01 + * @LastEditTime: 2022-06-13 22:14:45 * @Description: file content */ import '@/utils/poto-req'; @@ -279,21 +279,21 @@ class MsbIm { const { content } = result; // let newData = []; - // content.sessionVOS.forEach((item) => { - // if (item.lastMessage) { - // item.lastMessage.payload = JSON.parse(item.lastMessage.payload || {}); - // } - // let historyData = this.sessionData; - // let hisIndex = historyData.findIndex((i) => i.id === item.id); - // if (hisIndex >= 0) { - // historyData[hisIndex].lastMessage = item.lastMessage; - // historyData[hisIndex].unreadCount++; - // newData.push(historyData[hisIndex]); - // } else { - // item.messageList = []; - // newData = [...newData, item]; - // } - // }); + content.sessionVOS.forEach((item) => { + if (item.lastMessage) { + item.lastMessage.payload = JSON.parse(item.lastMessage.payload || {}); + } + // let historyData = this.sessionData; + // let hisIndex = historyData.findIndex((i) => i.id === item.id); + // if (hisIndex >= 0) { + // historyData[hisIndex].lastMessage = item.lastMessage; + // historyData[hisIndex].unreadCount++; + // newData.push(historyData[hisIndex]); + // } else { + // item.messageList = []; + // newData = [...newData, item]; + // } + }); this.setSessionData(content.sessionVOS); return Promise.resolve(result); }