zhengkaixin 2 rokov pred
rodič
commit
ab626b036b
1 zmenil súbory, kde vykonal 9 pridanie a 6 odobranie
  1. 9 6
      pages/news/index.vue

+ 9 - 6
pages/news/index.vue

@@ -62,12 +62,15 @@
 			}
 		},
 		onShow() {
-			if(this.carhelp.get("newsTypeCurrent") || this.carhelp.get("newsTypeCurrent")==0) {
-				this.newsTypeCurrent = this.carhelp.get("newsTypeCurrent");
-				this.current = this.newsTypeCurrent;
-				console.log(this.current)
+			var newsTypeCurrent= this.carhelp.get("newsTypeCurrent")
+			if(newsTypeCurrent!=""){
+				if(newsTypeCurrent || newsTypeCurrent==0) {
+					this.newsTypeCurrent = this.carhelp.get("newsTypeCurrent");
+					this.current = this.newsTypeCurrent;
+				}	
 			}
 			
+			
 			this.getType()
 			//this.getBannerInfo()
 		},
@@ -118,7 +121,7 @@
 				})
 				Api_common.getBannerInfo(code).then((res) => {
 					this.wrapList =res.data;
-					
+					uni.hideLoading()
 					}).catch(error => {
 						uni.showToast({
 						
@@ -147,7 +150,7 @@
 					if(this.tabList.length) {
 						this.newstype = this.tabList[this.newsTypeCurrent];
 					}
-
+				
 					if(this.newstype.shortName == 'HDBG') {
 						this.getActivityList(true)
 					} else {