张文飞 hace 3 años
padre
commit
a558ee3f2f
Se han modificado 1 ficheros con 10 adiciones y 1 borrados
  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();