coupons.wxml 4.6 KB
<!--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>