| | |
| | | </view> |
| | | </view> |
| | | |
| | | <view class="banner"> |
| | | <view class="banner" v-if="bannerData.length"> |
| | | <swiper class="swiper" circular :indicator-dots="indicatorDots" :indicator-color="indicatorColor" :autoplay="autoplay" :indicator-active-color="indicatorActiveColor" :interval="interval" :duration="duration"> |
| | | <swiper-item v-for="(item, index) in bannerData" @tap="$util.goPages('/pages/ginfo/ginfo?id=' + item.goodsid)"> |
| | | <!-- <swiper-item @tap="gotoUrl" v-if="bannerData.length>2"> |
| | | <image lazy-load src="/static/imgs/sBanner.png" mode=""></image> |
| | | </swiper-item> --> |
| | | <!-- <swiper-item v-for="(item, index) in bannerData" @tap="$util.goPages('/pages/ginfo/ginfo?id=' + item.goodsid)"> --> |
| | | <swiper-item v-for="(item, index) in bannerData" @tap="gotoUrl(item)"> |
| | | <image lazy-load :src="item.icon" mode=""></image> |
| | | </swiper-item> |
| | | </swiper> |
| | |
| | | // #endif |
| | | }, |
| | | methods: { |
| | | gotoUrl(data) { |
| | | if(data.sort === 100) { // data.sort === 100:跳转第三方,否则跳转产品详情 |
| | | uni.navigateTo({ |
| | | url: '/pages/web/web-linkUrl?src=' + 'https://equity.dm-cube.com/#/entrance/login?sourceCode=H5_gongzhonghao_null_kefu_null_3&platform=h5&account=h5&redirection=%252Fpage%253Fplatform%253Dh5%2526sourceCode%253DH5_gongzhonghao_null_kefu_null_3%2526account%253Dh5', |
| | | }) |
| | | } else { // 跳转产品详情 |
| | | this.$util.goPages('/pages/ginfo/ginfo?id=' + data.goodsid) |
| | | } |
| | | }, |
| | | getData () { |
| | | this.$util.post('Goods/getIndexData').then(res => { |
| | | this.bannerData = res.data.bannerData |