coupon-select.wxml
1.41 KB
<view class="coupon-use-select" wx:if="{{show}}">
<view class="mask"></view>
<view class="content">
<view class="header">选择优惠券
<image class="close" bindtap="cancel" src="../../assets/images/close-gray.png"></image></view>
<view class="empty" catchtouchmove="true" wx:if="{{!coupons.length}}">
没有可使用的优惠券哦
</view>
<block wx:else>
<scroll-view class="coupon-scroll" scroll-y>
<block wx:for="{{coupons}}" wx:key="{{item.coupon_code}}">
<view class="coupon-item">
<view class="left">
<text class="value">{{item.coupon_value_str}}</text>
<text class="condition" wx:if="{{item.use_rule_str}}">{{item.use_rule_str}}</text>
</view>
<view class="right">
<text class="name">{{item.coupon_name}}</text>
<text class="period">{{item.coupon_validity}}</text>
<block wx:if="{{item.isChosen}}">
<image bindtap="uncheck" class="checked" data-idx="{{index}}"
src="../../assets/images/checked.png"></image>
</block>
<block wx:else>
<view bindtap="check" class="check" data-idx="{{index}}"></view>
</block>
</view>
</view>
</block>
</scroll-view>
</block>
<view class="confirm" bindtap="confirm">确定</view>
</view>
</view>