From fa7dbd793fd9f5affbb5af25fa0afc9f79e5fb42 Mon Sep 17 00:00:00 2001 From: java110 <928255095@qq.com> Date: Tue, 12 Oct 2021 14:31:23 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../pages/property/parkingAreaControl/parkingAreaControl.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) 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: "连接关闭,请刷新浏览器"