|
|
@ -2,7 +2,7 @@
|
|
|
|
* @Author: ch
|
|
|
|
* @Author: ch
|
|
|
|
* @Date: 2022-05-18 14:54:47
|
|
|
|
* @Date: 2022-05-18 14:54:47
|
|
|
|
* @LastEditors: ch
|
|
|
|
* @LastEditors: ch
|
|
|
|
* @LastEditTime: 2022-06-13 18:54:30
|
|
|
|
* @LastEditTime: 2022-06-13 21:32:46
|
|
|
|
* @Description: file content
|
|
|
|
* @Description: file content
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
import '@/utils/poto-req';
|
|
|
|
import '@/utils/poto-req';
|
|
|
@ -34,6 +34,7 @@ const fromatPotoReq = (traceId, traceType, content) => {
|
|
|
|
message: res.getMessage(),
|
|
|
|
message: res.getMessage(),
|
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
class MsbIm {
|
|
|
|
class MsbIm {
|
|
|
|
defaultOption = {
|
|
|
|
defaultOption = {
|
|
|
|
ioKey: 'traceId',
|
|
|
|
ioKey: 'traceId',
|
|
|
@ -281,13 +282,12 @@ class MsbIm {
|
|
|
|
if (hisIndex >= 0) {
|
|
|
|
if (hisIndex >= 0) {
|
|
|
|
historyData[hisIndex].lastMessage = item.lastMessage;
|
|
|
|
historyData[hisIndex].lastMessage = item.lastMessage;
|
|
|
|
historyData[hisIndex].unreadCount++;
|
|
|
|
historyData[hisIndex].unreadCount++;
|
|
|
|
newData.push(historyData);
|
|
|
|
newData.push(historyData[hisIndex]);
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
item.messageList = [];
|
|
|
|
item.messageList = [];
|
|
|
|
newData = [...newData, item];
|
|
|
|
newData = [...newData, item];
|
|
|
|
}
|
|
|
|
}
|
|
|
|
});
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
this.setSessionData(newData);
|
|
|
|
this.setSessionData(newData);
|
|
|
|
return Promise.resolve(result);
|
|
|
|
return Promise.resolve(result);
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -459,5 +459,11 @@ class MsbIm {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return Promise.resolve(result);
|
|
|
|
return Promise.resolve(result);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
close() {
|
|
|
|
|
|
|
|
this.socket.close();
|
|
|
|
|
|
|
|
this.socket = null;
|
|
|
|
|
|
|
|
this.isOpen = false;
|
|
|
|
|
|
|
|
this.setSessionData([]);
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
export default MsbIm;
|
|
|
|
export default MsbIm;
|
|
|
|