From 8e76a4314516dfe0fe6142f7e50fe17756a10346 Mon Sep 17 00:00:00 2001 From: vee <897831508@qq.com> Date: Mon, 5 Sep 2022 14:59:26 +0800 Subject: [PATCH] =?UTF-8?q?=E9=A6=96=E9=A1=B5=E8=B7=AF=E5=BE=84=E8=B7=B3?= =?UTF-8?q?=E8=BD=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pages/home/index.vue | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) 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) }