zizhong.wang 2 роки тому
батько
коміт
5843c3cb23
1 змінених файлів з 30 додано та 22 видалено
  1. 30 22
      pages/index/index.vue

+ 30 - 22
pages/index/index.vue

@@ -157,29 +157,32 @@ export default {
   onShow() {
     uni.hideTabBar({});
 	
-	this.reset();
-	
 	let that = this;
-	that.getUserInfo();
-	setTimeout(function() {
-		 that.getUserInfo();
-	}, 100);
-	setTimeout(function() {
-		 that.getUserInfo();
-	}, 500);
-	setTimeout(function() {
-		 that.getUserInfo();
-	}, 800);
-	setTimeout(function() {
-		 that.getUserInfo();
-	}, 1000);
-	setTimeout(function() {
-		 that.getUserInfo();
-	}, 1500);
-	setTimeout(function() {
-		 that.getUserInfo();
-	}, 2000);
-	
+	this.isAuth = getApp().globalData.isAuth;
+	if (this.isAuth){
+		that.getHeatList();
+	}
+	else{
+		this.reset();
+		setTimeout(function() {
+			 that.getUserInfo();
+		}, 100);
+		setTimeout(function() {
+			 that.getUserInfo();
+		}, 500);
+		setTimeout(function() {
+			 that.getUserInfo();
+		}, 800);
+		setTimeout(function() {
+			 that.getUserInfo();
+		}, 1000);
+		setTimeout(function() {
+			 that.getUserInfo();
+		}, 1500);
+		setTimeout(function() {
+			 that.getUserInfo();
+		}, 2000);
+	}	
  },
   onLoad() {
     // uni.showLoading({
@@ -189,6 +192,11 @@ export default {
     //this.getSwiperList();
 	//this.getUserInfo();	
 	//this.getUserInfo();
+	this.isAuth = getApp().globalData.isAuth;
+	if (this.isAuth){
+		that.getHeatList();
+	}
+	
   },
   onShareAppMessage() {
   //  url: "/pages/index/index";