Quellcode durchsuchen

提交优化代码

wangming vor 1 Monat
Ursprung
Commit
eb0e21ff6c

+ 7 - 0
src/App.vue

@@ -1,3 +1,10 @@
+<template>
+    <view>
+        <slot></slot>
+        <alarModel />
+    </view>
+</template>
+
 <script>
 import Vue from "vue";
 

+ 0 - 1
src/pages/home/home.vue

@@ -131,7 +131,6 @@
             </view>
             <image src="../../static/arrFour.png" class="warmImage"></image>
         </view>
-        <alarModel v-if="isInitAlarm" />
         <tenMinutes v-if="isIniTenMinutes" />
     </view>
 </template>

+ 1 - 4
src/pagesA/OTA/OTA.vue

@@ -69,7 +69,6 @@
             v-if="devsClientId.length > 0 && otaList.length > 0"
             >更新OTA</view
         >
-        <!-- <alarModel ref="alarModel" /> -->
     </view>
 </template>
 
@@ -178,9 +177,7 @@ export default {
             });
         },
     },
-    onLoad() {
-        // this.$refs.alarModel.connectMQTTwo();
-    },
+    onLoad() {},
     onShow() {
         this.queryList();
         this.queryOtaList();

+ 0 - 1
src/pagesA/abnormalInfo/abnormalInfo.vue

@@ -88,7 +88,6 @@
             </view>
         </template>
         <view style="height: 20rpx"></view>
-        <alarModel v-if="isInitAlarm" />
     </view>
 </template>
 

+ 0 - 2
src/pagesA/adDevice/adDevice.vue

@@ -221,7 +221,6 @@
                 </view>
             </view>
         </view>
-        <!-- <alarModel ref="alarModel" /> -->
     </view>
 </template>
 <script>
@@ -603,7 +602,6 @@ export default {
         } else {
             console.log("没有参数");
         }
-        // this.$refs.alarModel.connectMQTTwo();
     },
 
     onUnload(options) {

+ 2 - 10
src/pagesA/deviceSetting/deviceSetting.vue

@@ -58,7 +58,6 @@
                 <view class="btn1" @click="goMoreSetting">更多设置</view>
             </view>
         </view>
-        <alarModel v-if="isInitAlarm" />
     </view>
 </template>
 <script>
@@ -68,7 +67,6 @@ export default {
             devInfo: "",
             devName: "",
             position: "",
-            isInitAlarm: "",
         };
     },
     methods: {
@@ -145,18 +143,12 @@ export default {
     },
     onLoad(options) {
         this.devInfo = JSON.parse(options.devInfo);
-        this.isInitAlarm = true;
     },
     onShow() {
-        this.isInitAlarm = true;
         this.getPosition(this.devInfo.installPosition);
     },
-    onUnload() {
-        this.isInitAlarm = false;
-    },
-    onHide() {
-        this.isInitAlarm = false;
-    },
+    onUnload() {},
+    onHide() {},
 };
 </script>
 <style lang="less">

+ 1 - 6
src/pagesA/devices/devices.vue

@@ -59,7 +59,6 @@
                     <image src="../../static/ln_small.png" mode="" />
                 </view>
             </view>
-            <alarModel v-if="isInitAlarm" />
         </view>
     </view>
 </template>
@@ -72,7 +71,6 @@ export default {
             option: ["全部", "离线", "在线", "报警"],
             selectValue: 0,
             devs: [],
-            isInitAlarm: false,
         };
     },
     methods: {
@@ -180,12 +178,9 @@ export default {
     },
     onLoad() {},
     onShow() {
-        this.isInitAlarm = true;
         this.queryList();
     },
-    onHide() {
-        this.isInitAlarm = false;
-    },
+    onHide() {},
     onUnload() {
         // this.isInitAlarm = false;
     },

+ 0 - 2
src/pagesA/homeDetail/homeDetail.vue

@@ -18,7 +18,6 @@
                 >
             </view>
         </view>
-        <!-- <alarModel ref="alarModel" /> -->
     </view>
 </template>
 
@@ -99,7 +98,6 @@ export default {
     },
     onLoad(options) {
         this.groupInfo = JSON.parse(options.groupInfo);
-        // this.$refs.alarModel.connectMQTTwo();
         console.log(this.groupInfo, 99999);
     },
     onShow() {

+ 0 - 2
src/pagesA/homeManage/homeManage.vue

@@ -82,7 +82,6 @@
                 </view>
             </view>
         </view>
-        <!-- <alarModel ref="alarModel" /> -->
     </view>
 </template>
 
@@ -206,7 +205,6 @@ export default {
     },
     onShow() {
         this.getgroupList();
-        // this.$refs.alarModel.connectMQTTwo();
     },
     onLoad() {},
 

+ 0 - 2
src/pagesA/linkShare/linkShare.vue

@@ -73,7 +73,6 @@
             确认分享
         </button>
         <button class="btn1" v-else @click="unShare()">暂不可分享</button>
-        <!-- <alarModel ref="alarModel" /> -->
     </view>
 </template>
 <script>
@@ -164,7 +163,6 @@ export default {
         setTimeout(() => {
             this.shareUserLink("分享链接创建成功");
         }, 500);
-        // this.$refs.alarModel.connectMQTTwo();
     },
 };
 </script>

+ 0 - 1
src/pagesA/loginNew/loginNew.vue

@@ -35,7 +35,6 @@
                 ></text
             >
         </view>
-        <alarModel />
     </view>
 </template>
 <script>

+ 3 - 11
src/pagesA/my/my.vue

@@ -48,7 +48,6 @@
         </view>
 
         <view class="logoutBtn" @click="goLogout">退出登录</view>
-        <alarModel v-if="isInitAlarm" />
     </view>
 </template>
 
@@ -58,7 +57,6 @@ export default {
         return {
             headerImg: "../../static/headerInfo.png",
             phone: uni.getStorageSync("phone"),
-            isInitAlarm: "",
         };
     },
     methods: {
@@ -133,15 +131,9 @@ export default {
             });
         },
     },
-    onLoad() {
-        this.isInitAlarm = true;
-    },
-    onHide() {
-        this.isInitAlarm = false;
-    },
-    onUnload() {
-        this.isInitAlarm = false;
-    },
+    onLoad() {},
+    onHide() {},
+    onUnload() {},
 };
 </script>
 

+ 0 - 2
src/pagesA/roomSetting/roomSetting.vue

@@ -243,7 +243,6 @@
                 </view>
             </view>
         </view>
-        <!-- <alarModel ref="alarModel" /> -->
     </view>
 </template>
 <script>
@@ -717,7 +716,6 @@ export default {
         this.devId = options.devId;
         this.getdevInfo(this.devId);
         this.getRoomInfo(this.devId);
-        // this.$refs.alarModel.connectMQTTwo();
     },
     onShow() {},
 };

+ 0 - 2
src/pagesA/serChange/serChange.vue

@@ -25,7 +25,6 @@
                 <button class="btn" @click="confirm">确认</button>
             </view>
         </view>
-        <!-- <alarModel ref="alarModel" /> -->
     </view>
 </template>
 
@@ -70,7 +69,6 @@ export default {
         },
     },
     onShow() {
-        // this.$refs.alarModel.connectMQTTwo();
         let selectedValue = uni.getStorageSync("sercviceChoice")
             ? uni.getStorageSync("sercviceChoice")
             : "aloneServe";

+ 0 - 1
src/pagesA/shareList/shareList.vue

@@ -157,7 +157,6 @@ export default {
         },
     },
     onShow() {
-        // this.$refs.alarModel.connectMQTTwo();
         this.getShareList();
     },
 

+ 0 - 2
src/pagesA/sharePages/sharePages.vue

@@ -54,7 +54,6 @@
                 <view class="meanRight" @click="refuseDevice(item)">拒绝</view>
             </view>
         </view>
-        <!-- <alarModel ref="alarModel" /> -->
     </view>
 </template>
 <script>
@@ -165,7 +164,6 @@ export default {
         this.devInfo = JSON.parse(options.devInfo);
         this.sharePhone = options.phone;
         this.shareId = options.shareId;
-        // this.$refs.alarModel.connectMQTTwo();
     },
     onShow() {
         let userId = uni.getStorageSync("userId");