From ba300da45a77f88d8e5116cbed84e969b28a3823 Mon Sep 17 00:00:00 2001 From: ch Date: Mon, 13 Jun 2022 21:53:36 +0800 Subject: [PATCH] =?UTF-8?q?fix:=E8=8E=B7=E5=8F=96=E4=BC=9A=E8=AF=9D?= =?UTF-8?q?=E5=88=97=E8=A1=A8=E7=9B=B4=E6=8E=A5=E9=87=8D=E6=96=B0=E8=B5=8B?= =?UTF-8?q?=E5=80=BC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/utils/msb-im.js | 36 ++++++++++++++++++------------------ 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/src/utils/msb-im.js b/src/utils/msb-im.js index e68f219..5d1c22c 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:40:12 + * @LastEditTime: 2022-06-13 21:53:01 * @Description: file content */ import '@/utils/poto-req'; @@ -277,24 +277,24 @@ class MsbIm { return Promise.reject(error); } const { content } = result; - let newData = []; + // 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]; - } - }); - this.setSessionData(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]; + // } + // }); + this.setSessionData(content.sessionVOS); return Promise.resolve(result); } /**