UI: 齐享购新增跳转第三方链接banner图功能
3 files modified
1 files added
| | |
| | | "name" : "齐享购", |
| | | "appid" : "__UNI__3333B1D", |
| | | "description" : "", |
| | | "versionName" : "1.4.0", |
| | | "versionCode" : 140, |
| | | "versionName" : "1.4.1", |
| | | "versionCode" : 141, |
| | | "transformPx" : false, |
| | | /* 5+App特有相关 */ |
| | | "app-plus" : { |
| | |
| | | "style": { |
| | | "navigationBarTitleText": "协议" |
| | | } |
| | | }, |
| | | { |
| | | "path": "pages/web/web-linkUrl", |
| | | "style": { |
| | | "navigationBarTitleText": "", |
| | | "navigationBarBackgroundColor": "#FFFFFF", |
| | | "app-plus": { |
| | | "titleNView": { |
| | | "type": "default" |
| | | } |
| | | } |
| | | } |
| | | } |
| | | ], |
| | | "tabBar": { |
| | |
| | | </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 |
| New file |
| | |
| | | <template> |
| | | <view class="content"> |
| | | <!-- #ifdef APP-PLUS --> |
| | | <web-view :src="src"></web-view> |
| | | <!-- #endif --> |
| | | <!-- #ifdef H5 --> |
| | | <iframe class="iframe" :src="src" frameborder="0"></iframe> |
| | | <!-- #endif --> |
| | | </view> |
| | | </template> |
| | | |
| | | <script> |
| | | export default { |
| | | |
| | | data() { |
| | | return { |
| | | src: null, |
| | | title: null, |
| | | hideRightIcon: false, |
| | | }; |
| | | }, |
| | | onLoad(option) { |
| | | if (option && option.src) { |
| | | this.src = option.src; |
| | | } |
| | | }, |
| | | }; |
| | | </script> |
| | | |
| | | <style> |
| | | /* #ifdef H5 */ |
| | | .iframe { |
| | | width: 100%; |
| | | overflow: hidden; |
| | | height: 100%; |
| | | } |
| | | .content { |
| | | height: calc(100vh - 44px); |
| | | padding: 0; |
| | | display: flex; |
| | | flex-direction: column; |
| | | background: rgb(217, 181, 152); |
| | | } |
| | | .iframe { |
| | | flex: 1; |
| | | } |
| | | /* #endif */ |
| | | </style> |