diff --git a/public/pages/property/parkingAreaControl/parkingAreaControl.js b/public/pages/property/parkingAreaControl/parkingAreaControl.js index 40ced0e2a..bfc9b7bc0 100644 --- a/public/pages/property/parkingAreaControl/parkingAreaControl.js +++ b/public/pages/property/parkingAreaControl/parkingAreaControl.js @@ -27,6 +27,7 @@ }) }, _initParkingAreaWs:function(){ + let clientId = vc.uuid(); let heartCheck = { timeout: 30000, // 9分钟发一次心跳,比server端设置的连接时间稍微小一点,在接近断开的情况下以通信的方式去重置连接时间。 serverTimeoutObj: null, @@ -51,7 +52,7 @@ heartCheck.reset().start(); // 如果获取到消息,说明连接是正常的,重置心跳检测 } else { console.log("断开状态,尝试重连"); - newWebSocket(); + $that._initParkingAreaWs(); } }, this.timeout) } @@ -114,7 +115,7 @@ //连接关闭的回调方法 websocket.onclose = function () { console.log("初始化失败"); - //newWebSocket(); + //$that._initParkingAreaWs(); this.$notify.error({ title: "错误", message: "连接关闭,请刷新浏览器"