From e1f852f9846124fa78643ea64293bbbb934e8fcb Mon Sep 17 00:00:00 2001 From: chuguofei <1633295391@qq.com> Date: Tue, 4 Jul 2023 22:33:35 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20show.html=20=E5=8A=A0=E5=85=A5=E5=AE=9A?= =?UTF-8?q?=E6=97=B6=E7=9B=91=E5=90=ACmq?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/main/webapp/page/visual/show.html | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/main/webapp/page/visual/show.html b/src/main/webapp/page/visual/show.html index 00caa79..ad36d25 100644 --- a/src/main/webapp/page/visual/show.html +++ b/src/main/webapp/page/visual/show.html @@ -260,7 +260,7 @@ }) client.on('message', function (topic, message, s) { message = JSON.parse(message) - let reportFlag,sensorID = null; + let reportFlag, sensorID = null; if (Object.prototype.toString.call(message) == '[object Object]') { reportFlag = message['report_flag']; @@ -275,6 +275,11 @@ }) client.subscribe("/scene/update/" + that.scene_id); client.publish('/sys/update/scene', that.scene_id + ''); + + setInterval(function () { + client.subscribe("/scene/update/" + that.scene_id); + client.publish('/sys/update/scene', that.scene_id + ''); + }, 3000) } }, created() {