app发送文字消息
This commit is contained in:
@@ -600,6 +600,7 @@ export default {
|
||||
var msgOnlie = {}
|
||||
//聊天记录
|
||||
var msgList = {}
|
||||
debugger
|
||||
var url = ''
|
||||
if (windowType == 'SINGLE') {
|
||||
msgOnlie = {
|
||||
@@ -665,7 +666,7 @@ export default {
|
||||
type: 3
|
||||
};
|
||||
var msgSendType = 'wating';
|
||||
|
||||
debugger
|
||||
//开始发送消息
|
||||
store.dispatch('sendMsg', {
|
||||
userId: userId,
|
||||
|
||||
@@ -36,9 +36,10 @@ export default {
|
||||
console.log("onP2PMessage :" + e);
|
||||
e = JSON.parse(e)
|
||||
e.data.pushType="MSG"
|
||||
const _data=JSON.parse(e.data.messageBody)
|
||||
e.data.msgContent={
|
||||
msgType:"TEXT",
|
||||
content:e.data.messageBody,
|
||||
content:_data.content,
|
||||
disturb:false,
|
||||
top:false,
|
||||
}
|
||||
|
||||
@@ -66,6 +66,7 @@ import { createStore } from 'vuex'
|
||||
console.log("========================")
|
||||
console.log("========================")
|
||||
console.error(data)
|
||||
debugger
|
||||
_im.sendP2PMessage(_im.createP2PTextMessage(data.userId,data.data.content))
|
||||
},
|
||||
updateChatDataState(context,data){
|
||||
@@ -165,10 +166,6 @@ import { createStore } from 'vuex'
|
||||
// })
|
||||
|
||||
_im.getSingleUserInfo(userId).then((res)=>{
|
||||
console.log(res.data)
|
||||
console.log(res.data)
|
||||
console.log(res.data)
|
||||
console.log(res.data)
|
||||
if (res.code == 200) {
|
||||
var detail=res.data
|
||||
data1[userId]={
|
||||
|
||||
@@ -177,6 +177,7 @@
|
||||
// uni.$on('onP2PMessage', this.onMessage)
|
||||
|
||||
this.talkTo = e;
|
||||
console.log(this.talkTo)
|
||||
// 根据Id
|
||||
this.$store
|
||||
.dispatch('createChatObj', {
|
||||
@@ -185,6 +186,9 @@
|
||||
})
|
||||
.then(res => {
|
||||
this.localData = res.data;
|
||||
|
||||
console.log(res.data)
|
||||
|
||||
if (e.windowType == 'SINGLE') {
|
||||
uni.setNavigationBarTitle({
|
||||
title: this.localData.fromInfo.nickName
|
||||
|
||||
Reference in New Issue
Block a user