Browse Source

首页路径跳转

master
vee 3 years ago
parent
commit
8e76a43145
  1. 16
      pages/home/index.vue

16
pages/home/index.vue

@ -22,11 +22,11 @@
<!-- #ifdef APP-PLUS -->
<u-swiper class="swiper" :list="swiperList" previousMargin="48rpx" nextMargin="80rpx" circular
<u-swiper class="swiper" :list="swiperList" @click="bannerClick" previousMargin="48rpx" nextMargin="80rpx" circular
:autoplay="true" radius="32rpx" bgColor="rgba(0,0,0,0)" height="360rpx">
<!-- #endif -->
<!-- #ifdef H5 -->
<u-swiper class="swiper" :list="swiperList" previousMargin="48rpx" nextMargin="80rpx" circular
<u-swiper class="swiper" :list="swiperList" @click="bannerClick" previousMargin="48rpx" nextMargin="80rpx" circular
:autoplay="true" radius="32rpx" bgColor="rgba(0,0,0,0)" height="360rpx" style="margin-top: 145rpx;">
<!-- #endif -->
@ -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)
}

Loading…
Cancel
Save