|
@@ -1897,7 +1897,7 @@
|
|
|
//console.log(message)
|
|
|
//发送消息
|
|
|
let that = this;
|
|
|
- if (this.ws && wsService.getReadyState === WebSocket.OPEN) {
|
|
|
+ if (wsService.getReadyState() === WebSocket.OPEN) {
|
|
|
//打开左侧loading防止重复点击
|
|
|
this.hallLeftLoading = true;
|
|
|
wsService.send(JSON.stringify(message));
|
|
@@ -2518,7 +2518,7 @@
|
|
|
|
|
|
console.log(message)
|
|
|
//发送消息
|
|
|
- if (this.ws && wsService.getReadyState === WebSocket.OPEN) {
|
|
|
+ if (wsService.getReadyState() === WebSocket.OPEN) {
|
|
|
wsService.send(message);
|
|
|
}
|
|
|
//关闭分享弹出框
|
|
@@ -2823,7 +2823,7 @@
|
|
|
};
|
|
|
// console.log("websocket发送消息:",wsService.getReadyState,WebSocket.OPEN)
|
|
|
//发送消息
|
|
|
- console.log("发送消息前的状态:",wsService.getReadyState() ,"==========" ,WebSocket.OPEN,message)
|
|
|
+ // console.log("发送消息前的状态:",wsService.getReadyState() ,"==========" ,WebSocket.OPEN,message)
|
|
|
if (wsService.getReadyState() === WebSocket.OPEN) {
|
|
|
wsService.send(message);
|
|
|
}
|
|
@@ -2842,8 +2842,9 @@
|
|
|
content:this.sendMessage.img.imgUrl,//用户发发送的消息
|
|
|
msg_type:2,//消息类型 1:文本 2:图片 3:文件 4:好友卡片 5:系统消息;6:加群卡片
|
|
|
};
|
|
|
- if (this.ws && wsService.getReadyState === WebSocket.OPEN) {
|
|
|
- this.ws.send(JSON.stringify(message));
|
|
|
+ // console.log("发送图片消息前的状态:",wsService.getReadyState(),WebSocket.OPEN)
|
|
|
+ if (wsService.getReadyState() === WebSocket.OPEN) {
|
|
|
+ wsService.send(JSON.stringify(message));
|
|
|
//发送完毕清除选择的图片
|
|
|
this.sendMessage.img.imgUrl='';
|
|
|
}
|
|
@@ -2866,8 +2867,8 @@
|
|
|
content:fileInfoString,//用户发发送的消息
|
|
|
msg_type:3,//消息类型 1:文本 2:图片 3:文件 4:好友卡片 5:系统消息;6:加群卡片
|
|
|
};
|
|
|
- if (this.ws && wsService.getReadyState === WebSocket.OPEN) {
|
|
|
- this.ws.send(JSON.stringify(message));
|
|
|
+ if (wsService.getReadyState() === WebSocket.OPEN) {
|
|
|
+ wsService.send(JSON.stringify(message));
|
|
|
//发送完毕清除选择的文件
|
|
|
this.sendMessage.file.fileUrl='';
|
|
|
}
|
|
@@ -2931,8 +2932,8 @@
|
|
|
|
|
|
console.log(message)
|
|
|
//发送消息
|
|
|
- if (this.ws && wsService.getReadyState === WebSocket.OPEN) {
|
|
|
- this.ws.send(JSON.stringify(message));
|
|
|
+ if (wsService.getReadyState() === WebSocket.OPEN) {
|
|
|
+ wsService.send(JSON.stringify(message));
|
|
|
}
|
|
|
//关闭分享弹出框
|
|
|
this.userCardWindowStatus = false;
|