@@ -16,6 +16,7 @@ Page({ | |||||
share01: imgurl.share01.url, | share01: imgurl.share01.url, | ||||
fail: imgurl.fail.url, | fail: imgurl.fail.url, | ||||
wmhome: imgurl.wmhome.url, | wmhome: imgurl.wmhome.url, | ||||
swiperCurrent: 0, | |||||
hidden: "hidden", | hidden: "hidden", | ||||
height: "", | height: "", | ||||
detailPicture:[], | detailPicture:[], | ||||
@@ -3,10 +3,10 @@ | |||||
<view class='coupons'> | <view class='coupons'> | ||||
<view class="coupons-body"> | <view class="coupons-body"> | ||||
<view wx:if="{{coverPicture.length>0}}" class="banner"> | <view wx:if="{{coverPicture.length>0}}" class="banner"> | ||||
<swiper class="index-slide" bindchange="swiperChange" autoplay="true" circular="false" current="{{swiperCurrent}}"> | |||||
<swiper class="index-slide" bindchange="swiperChange" autoplay="true" circular="false" current="{{swiperCurrent}}"> | |||||
<block wx:for="{{coverPicture}}" wx:key="unique"> | <block wx:for="{{coverPicture}}" wx:key="unique"> | ||||
<swiper-item> | <swiper-item> | ||||
<image data-data="{{item}}" mode='widthFix' src="{{item}}" class="index-slide-image" /> | |||||
<image data-data="{{item}}" mode='widthFix' src="{{item}}" class="index-slide-image" /> | |||||
</swiper-item> | </swiper-item> | ||||
</block> | </block> | ||||
</swiper> | </swiper> | ||||
@@ -82,9 +82,6 @@ | |||||
</view> | </view> | ||||
</view> | </view> | ||||
</view> | </view> | ||||
<view class='detailImg' wx:if="{{detailPicture.length>0}}"> | |||||
<image wx:for="{{detailPicture}}" wx:key="{{index}}" wx:for-item="item" src='{{item}}'></image> | |||||
</view> | |||||
<view class='applyshop'>适用门店</view> | <view class='applyshop'>适用门店</view> | ||||
<view class='posi' style='overflow:{{hidden}};height:{{height}}'> | <view class='posi' style='overflow:{{hidden}};height:{{height}}'> | ||||
<view class='posi_logo' wx:for="{{data.merchantVoList}}" wx:key="index" bindtap='gotoDetail' data-id='{{item.id}}'> | <view class='posi_logo' wx:for="{{data.merchantVoList}}" wx:key="index" bindtap='gotoDetail' data-id='{{item.id}}'> | ||||
@@ -112,6 +109,9 @@ | |||||
<text><text class='spot'></text>{{data.remark}}</text> | <text><text class='spot'></text>{{data.remark}}</text> | ||||
</view> | </view> | ||||
</view> | </view> | ||||
<view class='detailImg' wx:if="{{detailPicture.length>0}}"> | |||||
<image wx:for="{{detailPicture}}" wx:key="{{index}}" wx:for-item="item" src='{{item}}'></image> | |||||
</view> | |||||
</view> | </view> | ||||
<form bindsubmit="gotopay" data-type='{{data.type}}' report-submit='true'> | <form bindsubmit="gotopay" data-type='{{data.type}}' report-submit='true'> | ||||
@@ -719,7 +719,7 @@ checkbox-group, radio-group { | |||||
.detailImg { | .detailImg { | ||||
width: 92%; | width: 92%; | ||||
margin: 0 auto; | |||||
margin: 10rpx auto 0; | |||||
} | } | ||||
.detailImg image { | .detailImg image { | ||||
@@ -390,10 +390,12 @@ saveImageToPhotos: function (tempFilePath) { | |||||
url: config.api.merchantList, | url: config.api.merchantList, | ||||
data: data | data: data | ||||
}).then(res => { | }).then(res => { | ||||
let imgList = []; | |||||
imgList.push(res.data.list[0].merchantImgUrl) | |||||
that.setData({ | that.setData({ | ||||
data: res.data.list[0], | data: res.data.list[0], | ||||
shopVoList: res.data.list[0].shopVoList, | shopVoList: res.data.list[0].shopVoList, | ||||
imglist: JSON.parse(res.data.list[0].coverPicture) ? JSON.parse(res.data.list[0].coverPicture) : res.data.list[0].merchantImgUrl, | |||||
imglist: res.data.list[0].coverPicture == '[]' ? imgList:JSON.parse(res.data.list[0].coverPicture), | |||||
}) | }) | ||||
}) | }) | ||||
.catch(err => { | .catch(err => { | ||||
@@ -6,6 +6,11 @@ | |||||
</swiper-item> | </swiper-item> | ||||
</block> | </block> | ||||
</swiper> | </swiper> | ||||
<view class="dots"> | |||||
<block wx:for="{{imglist}}" wx:key="unique"> | |||||
<view class="dot{{index == swiperCurrent ? ' active' : ''}}"></view> | |||||
</block> | |||||
</view> | |||||
<view class='merchant-detail'> | <view class='merchant-detail'> | ||||
<!-- 品牌信息 --> | <!-- 品牌信息 --> | ||||
<view class='merchant-brand' style='position:relative;z-index:9'> | <view class='merchant-brand' style='position:relative;z-index:9'> | ||||
@@ -75,7 +80,7 @@ | |||||
</view> | </view> | ||||
<!-- 商户简介 --> | <!-- 商户简介 --> | ||||
<view wx:elif="{{currentTab==1}}"> | <view wx:elif="{{currentTab==1}}"> | ||||
<text wx:if="{{data.summary}}">{{data.summary}}</text> | |||||
<text wx:if="{{data.introduction}}">{{data.introduction}}</text> | |||||
<text wx:else>信息完善中,敬请期待。</text> | <text wx:else>信息完善中,敬请期待。</text> | ||||
</view> | </view> | ||||
</view> | </view> | ||||