coupons.wxml
4.6 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
83
84
<!--pages/my/coupons/coupons.wxml-->
<view class='page'>
<view class='banner'>
<view class='iconfont icon-fanhui' bindtap='get_back'></view>
<view class='coupons'>优惠券</view>
</view>
<view class='tab'>
<view class='{{use===1?"use":""}}' bindtap='changeUse1'>未使用</view>
<view class='{{use===2?"use":""}}' bindtap='changeUse2'>已使用</view>
<view class='{{use===3?"use":""}}' bindtap='changeUse3'>已过期</view>
</view>
<block wx:if='{{use===1}}'>
<view wx:if='{{unuse.length!=0}}'>
<view class='item_list_boxs' wx:for='{{unuse}}' wx:key='{{item.id}}'>
<view class='item_list'>
<view class='right_top_circle'>{{item.title}}</view>
<view class='list_character'>
<view class='triangle' bindtap='openXiaLa' data-id='{{item.id}}'>
<view class='iconfont {{open&&id==item.id?"icon-xiangxia":"icon-xiangshang"}}'></view>
</view>
<view class='money'>
<text>¥</text>{{item.price}}
</view>
<view class='sale'>{{item.title}}</view>
<view>
<view class='data' wx:if='{{item.end_time!=0}}'>有效期至:{{item.end_time}}</view>
<view class='data' wx:else></view>
</view>
</view>
</view>
<view class='item_list_box' wx:if='{{id==item.id&&open}}'>
<view class='limit_values'>可使用商品,仅限{{item.limit_values}}</view>
</view>
</view>
</view>
<view class='gogogo' wx:if='{{unuse.length==0}}'>
<image src='../../imgs/noMessage.png'></image>
<view>您暂时没有没使用的优惠券哦</view>
</view>
</block>
<block wx:if='{{use===2}}'>
<view wx:if='{{used.length!=0}}'>
<view class='item_list item_list_list' wx:for='{{used}}' wx:key='{{item.id}}'>
<view class='list_character'>
<view class='money'>
<text>¥</text>{{item.price}}
</view>
<view class='sale'>{{item.title}}</view>
<!-- 满200元可用(仅限蔬菜类目) -->
<view>
<view class='data' wx:if='{{item.end_time!=0}}'>有效期至:{{item.end_time}}</view>
<view class='data' wx:else></view>
</view>
</view>
</view>
</view>
<view class='gogogo' wx:if='{{used.length==0}}'>
<image src='../../imgs/noMessage.png'></image>
<view>您暂时没有已使用的优惠券哦</view>
</view>
</block>
<block wx:if='{{use===3}}'>
<view wx:if='{{over.length!=0}}'>
<view class='item_list item_list_list' wx:for='{{over}}' wx:key='{{item.id}}'>
<view class='list_character'>
<view class='money'>
<text>¥</text>{{item.price}}
</view>
<view class='sale'>{{item.title}}</view>
<view>
<view class='data' wx:if='{{item.end_time!=0}}'>有效期至:{{item.end_time}}</view>
<view class='data' wx:else></view>
</view>
</view>
</view>
</view>
<view class='{{over.length==0}}' class='gogogo'>
<image src='../../imgs/noMessage.png'></image>
<view>您暂时没有已过期的优惠券哦</view>
</view>
</block>
</view>