This commit is contained in:
2023-12-02 18:44:35 +08:00
parent 460ede57d2
commit 3688c421dc
16 changed files with 251 additions and 128 deletions

View File

@@ -141,6 +141,7 @@ const store = new Vuex.Store({
updateChartHistoryFromServer(context, data) {
const _userId = uni.getStorageSync("userId")
const _userInfo = uni.getStorageSync("userInfo")
var retdata = publicFc.getKeyObjectStorage(_userId + '_' + 'chatData')
var currentUserMsgList = retdata[data.userId].list
@@ -167,6 +168,7 @@ const store = new Vuex.Store({
messageKey:item.messageKey,
msgType:item.messageBody.msgType,
nickName:_userId==item.fromId?"我":detail.nickName,
portrait:_userId==item.fromId?_userInfo.photo:detail.photo,
personId:item.fromId,
sendtype:"waiting",
time:item.createTime,
@@ -191,6 +193,7 @@ const store = new Vuex.Store({
uni.setStorageSync(_userId + '_' + 'chatData', JSON.stringify(
retdata));
context.dispatch('getchatDatalist');
const _obj=_serverMsgList[_serverMsgList.length-1]
@@ -203,6 +206,7 @@ const store = new Vuex.Store({
if(_obj.msgType=="CALL_voice"){
_obj.content="【语音通话】"
}
//判断头像是谁的
context.dispatch('updateChatListInfoById',{
userId:data.userId,
@@ -211,7 +215,7 @@ const store = new Vuex.Store({
userId: data.userId,
personId: _userId,
nickName: detail.nickName,
portrait: detail.photo,
portrait:_userId==_obj.fromId?_userInfo.photo:detail.photo,
time: dayjs(_obj.createTime).format("YYYY/MM/DD HH:mm:ss"),
num: 0,
windowType: 'SINGLE',