Commit 1d5bb2d5 authored by xxx's avatar xxx

1

parent 671b1baa
...@@ -276,7 +276,7 @@ export default { ...@@ -276,7 +276,7 @@ export default {
return return
}else{ }else{
if(this.antennaConnectorBoolean){ if(this.antennaConnectorBoolean){
this.getSerialSendIndex(e.data) //this.getSerialSendIndex(e.data)
}else{ }else{
this.antennaConnectorBoolean = true; this.antennaConnectorBoolean = true;
} }
...@@ -293,7 +293,7 @@ export default { ...@@ -293,7 +293,7 @@ export default {
}, },
//WebSocket重连 //WebSocket重连
reconnectIndex(){ reconnectIndex(){
var This=this; var This = this;
if (this.websocketIndex.readyState === 1) { // that.websock.readyState = 1 表示连接成功,可以立即发送信息 if (this.websocketIndex.readyState === 1) { // that.websock.readyState = 1 表示连接成功,可以立即发送信息
This.websocketonmessageIndex(); This.websocketonmessageIndex();
} else if (this.websocketIndex.readyState === 0) { // 表示正在连接,设置300ms后发送信息 } else if (this.websocketIndex.readyState === 0) { // 表示正在连接,设置300ms后发送信息
...@@ -301,7 +301,6 @@ export default { ...@@ -301,7 +301,6 @@ export default {
This.websocketonmessageIndex(); This.websocketonmessageIndex();
}, 300); }, 300);
} else { // 连接未创建或者创建失败,则重新创建连接,并设置500ms后发送信息 } else { // 连接未创建或者创建失败,则重新创建连接,并设置500ms后发送信息
console.log(3);
This.initWebSocketIndex(); This.initWebSocketIndex();
setTimeout(function () { setTimeout(function () {
This.websocketonmessageIndex(); This.websocketonmessageIndex();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment