瀏覽代碼

提交设备告警

wangming 2 月之前
父節點
當前提交
a007e93643
共有 1 個文件被更改,包括 3 次插入1 次删除
  1. 3 1
      src/components/component/alarModel.vue

+ 3 - 1
src/components/component/alarModel.vue

@@ -500,7 +500,9 @@ export default {
         },
     },
     beforeMount() {
-        this.connectMQTT();
+        if (uni.getStorageSync("userId")) {
+            this.connectMQTT();
+        }
     },
     onHide() {
         if (this.mqttClient) this.mqttClient.end(true);