fix: show.html 加入定时监听mq
parent
34a595a504
commit
e1f852f984
|
|
@ -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() {
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue