Commit f52ceef6 authored by xxx's avatar xxx

1

parent 7ed6767a
...@@ -252,7 +252,7 @@ export default { ...@@ -252,7 +252,7 @@ export default {
}, },
//初始化weosocket //初始化weosocket
initWebSocketIndex(){ initWebSocketIndex(){
//const wsuri1 = "ws://192.168.0.111:9095/ws";//连接地址,可加参数 //const wsuri1 = "ws://192.168.0.105:9095/ws";//连接地址,可加参数
const wsuri1 = "ws://8.143.203.103:9095/ws";//连接地址,可加参数 const wsuri1 = "ws://8.143.203.103:9095/ws";//连接地址,可加参数
this.websocketIndex = new WebSocket(wsuri1); this.websocketIndex = new WebSocket(wsuri1);
this.websocketIndex.onopen = this.websocketonopenIndex; this.websocketIndex.onopen = this.websocketonopenIndex;
...@@ -269,16 +269,16 @@ export default { ...@@ -269,16 +269,16 @@ export default {
websocketonerrorIndex(e) { websocketonerrorIndex(e) {
console.log("9095WebSocket连接发生错误"); console.log("9095WebSocket连接发生错误");
//WebSocket重连 //WebSocket重连
this.reconnectIndex(); this.initWebSocketIndex();
}, },
//WebSocket数据接收 //WebSocket数据接收
websocketonmessageIndex(e){ websocketonmessageIndex(e){
console.log("indexWebsocketMessage",e.data);
if(e == undefined){ if(e == undefined){
return return
}else{ }else{
console.log("indexWebsocketMessage",e.data);
if(this.antennaConnectorBoolean){ if(this.antennaConnectorBoolean){
//this.getSerialSendIndex(e.data) this.getSerialSendIndex(e.data)
}else{ }else{
this.antennaConnectorBoolean = true; this.antennaConnectorBoolean = true;
} }
......
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