Sfoglia il codice sorgente

提交优化代码

wangming 1 mese fa
parent
commit
94fda9a620

+ 3 - 4
src/pages/home/home.vue

@@ -312,12 +312,12 @@ export default {
     },
     onLoad() {},
     onShow() {
-        this.showModle = true;
         if (uni.getStorageSync("userId")) {
             this.getperSonInfo();
             this.getShareNum();
             this.getwarmType();
             this.getWarnList();
+            this.showModle = true;
             this.isIniTenMinutes = true;
         }
         // 配置服务器
@@ -327,12 +327,11 @@ export default {
         }
     },
     onHide() {
-        this.isIniTenMinutes = false;
         this.showModle = false;
+        this.isIniTenMinutes = false;
     },
     onUnload() {
-        this.isIniTenMinutes = false;
-        this.showModle = false;
+        // this.isIniTenMinutes = false;
     },
 
     onShareAppMessage() {

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

@@ -985,6 +985,7 @@ export default {
     },
     onShow() {
         this.showModle = true;
+        this.todayDate = this.$time(new Date(), 2);
     },
     onLoad(options) {
         const devItem = JSON.parse(options.devItem);
@@ -1028,7 +1029,6 @@ export default {
     onUnload() {
         this.inactivityTimer = null;
         this.autoPlayinterval = null;
-        this.showModle = false;
         if (this.mqttData) {
             this.mqttData.end(true);
             this.mqttData = null;
@@ -1036,6 +1036,7 @@ export default {
         }
     },
     onHide() {
+        this.showModle = false;
         // this.inactivityTimer = null;
         // this.autoPlayinterval = null;
         // this.showModle = false;

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

@@ -178,9 +178,7 @@ export default {
     onHide() {
         this.showModle = false;
     },
-    onUnload() {
-        this.showModle = false;
-    },
+    onUnload() {},
 
     onPullDownRefresh() {
         uni.showNavigationBarLoading();

+ 1 - 3
src/pagesA/healthAlarm/healthAlarm.vue

@@ -238,9 +238,7 @@ export default {
     onHide() {
         this.showModle = false;
     },
-    onUnload() {
-        this.showModle = false;
-    },
+    onUnload() {},
 };
 </script>
 <style lang="less" scoped>

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

@@ -143,10 +143,7 @@ export default {
     onHide() {
         this.showModle = false;
     },
-
-    onUnload() {
-        this.showModle = false;
-    },
+    onUnload() {},
 };
 </script>