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() {