diff --git a/pages/home/index.vue b/pages/home/index.vue index ce32c04..eaf7ad0 100644 --- a/pages/home/index.vue +++ b/pages/home/index.vue @@ -22,11 +22,11 @@ - - @@ -151,6 +151,7 @@ swiperList: [ ], + bannerList:[], videoShow: false, videoUrl: '', videoList: [], @@ -197,6 +198,16 @@ } }, methods: { + bannerClick(i){ + // #ifdef APP-PLUS + plus.runtime.openUrl(this.bannerList[i].adUrl) + // #endif + // #ifdef H5 + var href = this.bannerList[i].adUrl + window.open(href, '_blank'); + // #endif + + }, // 获取用户余额信息 getUserInfoBalance() { api.userAccount().then(res => { @@ -323,6 +334,7 @@ api.indexBanner({ 'mark': 'APP_INDEX' }).then(res => { + this.bannerList=res for (var i = 0; i < res.length; i++) { this.swiperList.push(this.baseURL + res[i].adImgPath) }