Sfoglia il codice sorgente

跌倒事件与全局弹窗

wangming 1 mese fa
parent
commit
60d3ff40fe
1 ha cambiato i file con 5 aggiunte e 2 eliminazioni
  1. 5 2
      src/pagesA/deviceDetail/deviceDetail.vue

+ 5 - 2
src/pagesA/deviceDetail/deviceDetail.vue

@@ -1014,10 +1014,13 @@ export default {
             this.mqttData.on("message", (topic, message) => {
                 console.log("topic", topic, message);
                 const match = topic.match(/^\/dev\/(.+)\/tracker_targets$/);
-                if (!match || match[1] !== clientId) {
+                if (!match) {
                     this.$refs.alarmModel.hanOtherMessage(topic, message);
+                    return;
+                }
+                if (match[1] == clientId) {
+                    this.handleMessage(topic, message, clientId);
                 }
-                this.handleMessage(topic, message, clientId);
             });
         }
     },