|
|
@ -2,7 +2,7 @@
|
|
|
|
* @Author: ch
|
|
|
|
* @Author: ch
|
|
|
|
* @Date: 2022-06-12 14:04:56
|
|
|
|
* @Date: 2022-06-12 14:04:56
|
|
|
|
* @LastEditors: ch
|
|
|
|
* @LastEditors: ch
|
|
|
|
* @LastEditTime: 2022-06-13 10:52:48
|
|
|
|
* @LastEditTime: 2022-06-13 11:48:41
|
|
|
|
* @Description: file content
|
|
|
|
* @Description: file content
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
|
@ -39,8 +39,8 @@ export default ({store }) => {
|
|
|
|
let data = Im.sessionData.find(i => {
|
|
|
|
let data = Im.sessionData.find(i => {
|
|
|
|
return (i.type === 4 && (typeof i.payload === 'string' ? JSON.parse(i.payload).type === 'system' : false));
|
|
|
|
return (i.type === 4 && (typeof i.payload === 'string' ? JSON.parse(i.payload).type === 'system' : false));
|
|
|
|
}) || {}
|
|
|
|
}) || {}
|
|
|
|
|
|
|
|
console.log(data,'---');
|
|
|
|
let msgCount = data.unreadCount || 0;
|
|
|
|
let msgCount = data.unreadCount || 0;
|
|
|
|
Im.setCurSessionId(data.id);
|
|
|
|
|
|
|
|
store.commit('setSocketMsgData', JSON.parse(JSON.stringify(data)));
|
|
|
|
store.commit('setSocketMsgData', JSON.parse(JSON.stringify(data)));
|
|
|
|
store.commit('setUnreadCount', msgCount);
|
|
|
|
store.commit('setUnreadCount', msgCount);
|
|
|
|
}
|
|
|
|
}
|
|
|
|