|
|
@@ -86,6 +86,7 @@ export default {
|
|
|
}
|
|
|
},
|
|
|
connectMqtt() {
|
|
|
+ let self = this;
|
|
|
const url = localStorage.getItem('mqttUrl')
|
|
|
const username = localStorage.getItem('mqttUser')
|
|
|
const password = localStorage.getItem('mqttPassword')
|
|
|
@@ -110,7 +111,9 @@ export default {
|
|
|
|
|
|
this.mqttClient.on('message', async (topic, message) => {
|
|
|
if(message){
|
|
|
- this.getTriggerInfo();
|
|
|
+ setTimeout(function(){
|
|
|
+ self.getTriggerInfo();
|
|
|
+ },1000);
|
|
|
}
|
|
|
});
|
|
|
|