|
|
|
@ -2,7 +2,7 @@
|
|
|
|
|
* @Author: ch
|
|
|
|
|
* @Date: 2022-05-18 14:54:47
|
|
|
|
|
* @LastEditors: ch
|
|
|
|
|
* @LastEditTime: 2022-06-13 15:16:50
|
|
|
|
|
* @LastEditTime: 2022-06-13 18:54:30
|
|
|
|
|
* @Description: file content
|
|
|
|
|
*/
|
|
|
|
|
import '@/utils/poto-req';
|
|
|
|
@ -193,9 +193,9 @@ class MsbIm {
|
|
|
|
|
newData = [
|
|
|
|
|
...historyData,
|
|
|
|
|
{
|
|
|
|
|
fromAvatar: ctx.fromAvatar,
|
|
|
|
|
fromAvatar: ctx.session.fromAvatar,
|
|
|
|
|
fromId: ctx.fromId,
|
|
|
|
|
fromNickname: ctx.fromNickname,
|
|
|
|
|
fromNickname: ctx.session.fromNickname,
|
|
|
|
|
id: ctx.sessionId,
|
|
|
|
|
lastMessage: ctx,
|
|
|
|
|
messageList: [ctx],
|
|
|
|
@ -270,6 +270,7 @@ class MsbIm {
|
|
|
|
|
return Promise.reject(error);
|
|
|
|
|
}
|
|
|
|
|
const { content } = result;
|
|
|
|
|
let newData = [];
|
|
|
|
|
|
|
|
|
|
content.sessionVOS.forEach((item) => {
|
|
|
|
|
if (item.lastMessage) {
|
|
|
|
@ -280,13 +281,14 @@ class MsbIm {
|
|
|
|
|
if (hisIndex >= 0) {
|
|
|
|
|
historyData[hisIndex].lastMessage = item.lastMessage;
|
|
|
|
|
historyData[hisIndex].unreadCount++;
|
|
|
|
|
this.setSessionData(historyData);
|
|
|
|
|
newData.push(historyData);
|
|
|
|
|
} else {
|
|
|
|
|
item.messageList = [];
|
|
|
|
|
const newData = [...historyData, item];
|
|
|
|
|
this.setSessionData(newData);
|
|
|
|
|
newData = [...newData, item];
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
this.setSessionData(newData);
|
|
|
|
|
return Promise.resolve(result);
|
|
|
|
|
}
|
|
|
|
|
/**
|
|
|
|
|