useCoupon.wxml
3.53 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
<view class='container'>
<view class='header'>
<view class="space"/>
<view class='headerTopView'>
<view class="inputView">
<input class="input" type="text" placeholder="请输入优惠码" placeholder-style="color: #BDBDBD;font-family: PingFang SC;font-size: 30rpx;" bindinput="listenerPhoneInput" />
</view>
<block wx:if="{{duihuanButtonEnable}}">
<view class='button' style="background-color: black;"bindtap="duihuanTapped">
<text class="buttonText" >兑换</text>
</view>
</block>
<block wx:else>
<view class='button' style="background-color: #BDBDBD;"bindtap="duihuanTapped">
<text class="buttonText">兑换</text>
</view>
</block>
</view>
<view class='headerBottomView'>
<text class="detailText">{{detailText}}</text>
</view>
</view>
<scroll-view scroll-y="{{hasCoupon}}" style="height: {{listH}}px;background-color: #e0e0e0;" bindscrolltolower="loadMore">
<block wx:if="{{hasCoupon}}">
<view class="useCouponCellView">
<block wx:for="{{list}}" wx:key="unique">
<view class='couponView' style="height: {{cellHeight}}px;width: {{cellWidth}}px;">
<block wx:if="{{item.coupon_type == '5'}}">
<image style="height: {{cellHeight}}px;width: {{cellWidth}}px;" src="{{couponBackImage_b}}">
</image>
</block>
<block wx:else>
<image style="height: {{cellHeight}}px;width: {{cellWidth}}px;" src="{{couponBackImage_r}}">
</image>
</block>
<view class='couponHeader' style="top: {{-cellHeight-5}}px;width: {{cellWidth}}px;height: {{cellHeaderHeight}}px;">
<text class="couponCellTitle">{{item.coupon_name}}</text>
</view>
<view class='couponBottom' style="bottom: {{cellHeight+10}}px;width: {{cellWidth}}px;height: {{cellBottomHeight}}px;">
<view class='left' style="width: {{cellBottomleftW}}px;height: {{cellBottomHeight}}px;">
<text class="price"style="margin-top:{{priceTop}}px">{{item.coupon_value}}</text>
</view>
<view class='middle' style="width: {{cellBottomMiddleW}}px;height: {{cellBottomHeight-20}}px;">
<text class="timeDetail">{{item.coupon_validity}}(即将到期)</text>
</view>
<view class='right' style="width: {{cellBottomRightW}}px;height: {{cellBottomHeight}}px;">
<block wx:if="{{item.hasSelect}}">
<image class="selectIcon" src="{{address_Checked}}" bindtap="selectCouponAction" data-name="{{index}}"></image>
</block>
<block wx:else>
<image class="selectIcon" src="{{address_Check}}" bindtap="selectCouponAction" data-name="{{index}}"></image>
</block>
</view>
</view>
</view>
</block>
<view style="height: 10px;background-color: #e0e0e0;"></view>
</view>
</block>
<block wx:else>
<view class='emptyClass' style='width:100%;height:100%;'>
<image src="images/empty@3x.png" style="width:215rpx;height:124rpx;margin-top:280rpx"></image>
<view style="font-size:30rpx;text-align:center;margin-top:30rpx;color:#444444;">没有可用的优惠券</view>
</view>
</block>
</scroll-view>
<view class='bottom'>
<view class="button1" bindtap="useTapped">
<text class="buttonText1">使用</text>
</view>
<view class="button2" bindtap="notuUseTapped">
<text class="buttonText2">不使用</text>
</view>
</view>
</view>