张文飞 3 سال پیش
والد
کامیت
a558ee3f2f
1فایلهای تغییر یافته به همراه10 افزوده شده و 1 حذف شده
  1. 10 1
      pages/homePage/homePage.vue

+ 10 - 1
pages/homePage/homePage.vue

@@ -270,10 +270,19 @@
 				optionType:1,
 				registAmount:null,
 				shareToken:"",
-				isVisiable:true
+				isVisiable:true,
+				isPageHide:false,
 			}
 		},
 		mounted() {
+			window.addEventListener('pageshow', function(){        
+			    if(this.isPageHide) {
+			        window.location.reload();
+			    }
+			})
+            window.addEventListener('pagehide',function(){
+				this.isPageHide = true;
+			})
 			this.isFirst = true
 			this.color4 = app.globalData.color4;
 			this.getData();