|
@@ -137,7 +137,7 @@ export default {
|
|
this.qwIm.initASocket(userId,true,this);
|
|
this.qwIm.initASocket(userId,true,this);
|
|
// 监听socket连接
|
|
// 监听socket连接
|
|
this.qwIm.aSoket.onopen = function() {
|
|
this.qwIm.aSoket.onopen = function() {
|
|
- console.log("socket 连接成功...");
|
|
|
|
|
|
+ console.log("aSocket 连接成功...");
|
|
};
|
|
};
|
|
this.qwIm.aSoket.onerror = function() {
|
|
this.qwIm.aSoket.onerror = function() {
|
|
console.log("连接错误")
|
|
console.log("连接错误")
|
|
@@ -146,7 +146,7 @@ export default {
|
|
const IMUI = this.$refs.IMUI;
|
|
const IMUI = this.$refs.IMUI;
|
|
this.qwIm.aSoket.onmessage = function(res) {
|
|
this.qwIm.aSoket.onmessage = function(res) {
|
|
var data=JSON.parse(res.data);
|
|
var data=JSON.parse(res.data);
|
|
- //console.log("收到服务端内容", JSON.stringify(data));
|
|
|
|
|
|
+ console.log("aSocket收到服务端内容", JSON.stringify(data));
|
|
if(data.cmd=="heartbeat"){ //收到心跳数据不处理
|
|
if(data.cmd=="heartbeat"){ //收到心跳数据不处理
|
|
console.log("heartbeat");
|
|
console.log("heartbeat");
|
|
}
|
|
}
|
|
@@ -168,7 +168,7 @@ export default {
|
|
};
|
|
};
|
|
// 监听socket重连
|
|
// 监听socket重连
|
|
this.qwIm.aSoket.onreconnect = function(res) {
|
|
this.qwIm.aSoket.onreconnect = function(res) {
|
|
- console.log("socket 断线重连...")
|
|
|
|
|
|
+ console.log("aSocket 断线重连...")
|
|
};
|
|
};
|
|
}
|
|
}
|
|
},
|
|
},
|