diff --git a/im-uniapp/common/publicFc.js b/im-uniapp/common/publicFc.js index 93f9ef7..8a6fe13 100644 --- a/im-uniapp/common/publicFc.js +++ b/im-uniapp/common/publicFc.js @@ -353,7 +353,7 @@ export default { time: resbody.createTime, //时间 fromInfo: resbody.fromInfo, //来源信息 groupInfo: resbody.groupInfo, //群信息 - userId: _userId, //talktoId + userId: userId, //talktoId personId: resbody.fromInfo.userId, msgId: resbody.msgId, //消息Id disturb: resbody.msgContent.disturb, //是否静默消息 diff --git a/im-uniapp/common/socketTask.js b/im-uniapp/common/socketTask.js index 9a11a6a..414099d 100644 --- a/im-uniapp/common/socketTask.js +++ b/im-uniapp/common/socketTask.js @@ -37,7 +37,7 @@ export default { e = JSON.parse(e) e.data.pushType="MSG" e.data.msgContent={ - msgType:"UNKOWN", + msgType:"TEXT", content:e.data.messageBody, disturb:false, top:false, @@ -45,6 +45,7 @@ export default { e.data.windowType="SINGLE" e.data.createTime=e.data.messageTime; + e.data.userId=e.data.fromId; e.data.fromInfo={ userId:e.data.fromId };