index.wxml
7.12 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
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
<view class="coupons_container">
<view class="tab_widget">
<tab tab="{{tabs}}" bindclick="changeTab"></tab>
</view>
<block wx:if="{{showLogin}}">
<view class="no_data">
<glsx-image webp class="nodata_bg" src="coupons/no_card_bg.png" />
<view class="nodata_text">暂无优惠券</view>
</view>
</block>
<block wx:else>
<block wx:if="{{flag}}">
<view wx:if="{{couponsList.length}}" style="height:-116rpx;padding-bottom: 35rpx;" class="content_widget">
<scroll-view scroll-y="{{true}}" style="height:100%;padding: 0 32rpx;box-sizing: border-box;" class="scroll_wrap" bindscrolltolower="bottomToRefresh">
<!-- listWidth -->
<view wx:for="{{couponsList}}" wx:key="index">
<block wx:if="{{curTabIndex == 0}}">
<view class="flex storeName">
<text class="storeWidth">{{item.merchantName}}</text>
<text class="{{curTabIndex == 0 ? 'stretchColor':'stretch'}}">({{item.couponAmount}}张)</text>
</view>
<block wx:for="{{item.userCouponList}}" wx:for-item="i" wx:key="id">
<coupon-item btnStatus="{{curTabIndex}}" coupons="{{i}}" useMemberType="{{curTabIndex}}"></coupon-item>
<view class="associatedOrder" wx:if="{{i.goodsOrderCode && curTabIndex == 1}}">
<view class="order">该券已用在订单:</view>
<view class="order-X" catchtap="jump" data-item="{{i.goodsOrderCode}}">{{i.goodsName}}</view>
<view class="checkOrder" catchtap="jump" data-item="{{i.goodsOrderCode}}">查看订单></view>
</view>
</block>
<block wx:if="{{haveCouponsList[index].length > 4}}">
<view class="flex checkList" wx:if="{{!item.checkCoupon}}" catchtap="state" data-key="{{index}}">
<view class="check">查看剩余所有券</view>
<glsx-image webp class="state" src="mine/coupon/down.png" />
</view>
<view class="flex checkList" wx:else catchtap="state" data-key="{{index}}">
<view class="check">收起</view>
<glsx-image webp class="state" src="mine/coupon/up.png" />
</view>
</block>
</block>
<block wx:else>
<view class="online_conpon_ctnr" wx:for="{{item.userCouponList}}" wx:for-item="i" wx:key="id">
<view class="online_conpon">
<view class="price_wrap">
<view>
<text class="num">{{i.denomination || 0}}</text>
<text class="unit">元</text>
</view>
<view class="tip">无门槛</view>
</view>
<view class="info_wrap">
<view class="name">{{i.brandName ? i.brandName + '·' : ''}}{{i.appearance == 2 ? i.goodsName + i.rechargeDenomination : i.goodsName}}</view>
<!-- <view class="remark">无门槛</view> -->
<view class="date" wx:if="{{i.discountType == 8}}">数量:{{i.amount}}</view>
<view class="date" wx:if="{{i.discountType != 8}}">有效期{{i.effectiveDays || 0}}天</view>
<view class="date" wx:else>剩余有效期:{{i.residueEffectiveDays || 0}}天</view>
<view class="use_btn" bindtap="toUseConpon" data-item="{{i}}">去使用</view>
</view>
</view>
</view>
</block>
</view>
</scroll-view>
</view>
<view wx:else class="no_data">
<glsx-image webp class="nodata_bg" src="coupons/no_card_bg.png" />
<view class="nodata_text">暂无优惠券</view>
</view>
<view class="involid_btn isFullSucreen-btn">
<view class="view_involid" bindtap="goInvolidPage">
<text class="text">查看失效券</text>
<glsx-image class="right" src="mine/right.png"></glsx-image>
</view>
</view>
</block>
<!-- 定向礼包弹框 -->
<view wx:if="{{showGiftsModal}}" class="gifts_modal flex_ccc">
<view class="gifts_wrap flex_ccc">
<view wx:if="{{giftsList.length>2}}" class="gifts_wrapper flex_ccc">
<glsx-image webp mode="widthFix" class="gifts_modal_bg" src="{{imgBaseURL}}gifts_list_bg.png" />
<view class="gifts_content_wrap">
<view wx:for="{{giftsList}}" class="gifts_item_wrap">
<glsx-image webp mode="widthFix" class="gifts_item_bg" src="{{imgBaseURL}}gifts_coupons_bg.png" />
<view class="gifts_po_wrap">
<view class="left_widget">
<view class="coup_title">{{item.couponName}}</view>
<view wx:if="{{item.effectiveType==3}}" class="coup_tip">无限期</view>
<view wx:if="{{item.effectiveType==2}}" class="coup_tip">有效期:{{item.receiveStartTime}}-{{item.receiveEndTime}}</view>
<view wx:if="{{item.effectiveType==1}}" class="coup_tip">有效至{{item.receiveEndTime}}</view>
</view>
<view class="right_widget">
<glsx-image webp mode="widthFix" bind:tap="toUseGifts" data-item="{{item}}" class="gifts_to_use_bg" src="{{imgBaseURL}}gifts_touse.png" />
</view>
</view>
</view>
<view style="height:88rpx"></view>
</view>
<glsx-image webp mode="widthFix" class="gifts_modal_bottom_bg" src="{{imgBaseURL}}gifts_fixed_bottom.png" />
</view>
<view wx:if="{{giftsList.length<3}}" class="mini_widget flex_ccc">
<glsx-image webp mode="widthFix" class="mini_header_bg" src="{{imgBaseURL}}gifts_header_bg.png" />
<view class="mini_box_wrap" style="height:{{giftsList.length==2?408:298}}rpx">
<glsx-image webp class="mini_box_bg" style="height:{{giftsList.length==2?450:340}}rpx" src="{{imgBaseURL}}gifts_box_bg.png" />
<view style="height:50rpx"></view>
<view wx:for="{{giftsList}}" class="gifts_item_wrap">
<glsx-image webp mode="widthFix" class="gifts_item_bg" src="{{imgBaseURL}}gifts_coupons_bg.png" />
<view class="gifts_po_wrap">
<view class="left_widget">
<view class="coup_title">{{item.couponName}}</view>
<view wx:if="{{item.effectiveType==3}}" class="coup_tip">无限期</view>
<view wx:if="{{item.effectiveType==2}}" class="coup_tip">有效期:{{item.receiveStartTime}}-{{item.receiveEndTime}}</view>
<view wx:if="{{item.effectiveType==1}}" class="coup_tip">有效至{{item.receiveEndTime}}</view>
</view>
<view class="right_widget">
<glsx-image webp mode="widthFix" bind:tap="toUseGifts" data-item="{{item}}" class="gifts_to_use_bg" src="{{imgBaseURL}}gifts_touse.png" />
</view>
</view>
</view>
</view>
</view>
<glsx-image webp mode="widthFix" bind:tap="clickClose" class="gifts_modal_btn" src="{{imgBaseURL}}gifts_comfirm_btn.png" />
</view>
</view>
</block>
</view>