zhengkaixin 3 jaren geleden
bovenliggende
commit
1014f1112f
1 gewijzigde bestanden met toevoegingen van 6 en 3 verwijderingen
  1. 6 3
      pages/news/index.vue

+ 6 - 3
pages/news/index.vue

@@ -66,12 +66,12 @@
 		},
 		
 		methods: {
-			getBannerInfo(){
+			getBannerInfo(code){
 				uni.showLoading({
 					title: "加载中",
 					mask: true,
 				})
-				Api_common.getBannerInfo("TZGG").then((res) => {
+				Api_common.getBannerInfo(code).then((res) => {
 					this.wrapList =res.data;
 					
 					}).catch(error => {
@@ -96,6 +96,8 @@
 						this.newstype=this.tabList[0]	
 					}
 					this.getList()
+					this.getBannerInfo(this.newstype.shortName)
+					
  					uni.hideLoading()
 					
 				}).catch(error => {
@@ -152,11 +154,12 @@
 					this.newstype=this.tabList[index]
 				}
 				this.getList(true)
+				this.getBannerInfo(this.newstype.shortName)
 			},
 			onReady() {
 			
 				this.getType()
-				this.getBannerInfo()
+				//this.getBannerInfo()
 			}
 		},