소스 검색

提交设备告警

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);