coupon.wxml
10.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
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
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
<navigation-bar custom page-title="卡券详情">
<view class="navigation">
<view class="back text-center y-center" bindtap="jump">
<glsx-image webp src="mall/back.png" class="icon"></glsx-image>
</view>
<view class="text box-center">
卡券详情
</view>
</view>
</navigation-bar>
<view class="layout isFullSucreen" wx:if="{{couponDetail.couponName}}" style="margin-top: {{navHeight}}px;">
<block wx:if="{{qr}}">
<block wx:if="{{couponDetail.discountType == 3 && couponDetail.useChannel == 1}}">
<view class="coupon-X">
<glsx-image webp src="mine/coupon/daijin.png" class="bg"></glsx-image>
<view class="infoss">
<view class="left_box">
<text class="price_icon">¥</text>
<text>{{couponDetail.denomination / 100}}</text>
</view>
<view class="right_box">
<view class="top_box">
<view class="voucherName brightColor">{{couponDetail.couponName}}</view>
<view wx:if="{{couponDetail.useBarriers==1}}" class="h4_text describeColor">无门槛</view>
<view wx:if="{{couponDetail.useBarriers==2}}" class="h4_text describeColor">满{{couponDetail.full}}元可用</view>
</view>
<view class="bottom_box">
<view wx:if="{{couponDetail.effectiveType==3}}" class="h4_text timeColor">永久有效</view>
<view wx:if="{{couponDetail.effectiveType==2}}" class="h4_text timeColor">{{detailInfo.receiveStartTime}}-{{detailInfo.receiveEndTime}}</view>
<view wx:if="{{couponDetail.effectiveType==1}}" class="h4_text timeColor">有效期至{{detailInfo.receiveEndTime}}</view>
</view>
</view>
</view>
</view>
<view style="height: 18rpx;"></view>
</block>
<block wx:else>
<view class="qr-box box">
<view class="top">
<view class="title flex">
<view class="title_text {{detailInfo.useMemberType == 0 || couponDetail.useMemberType == 0 ? 'qrText':'changeColor'}}">{{detailInfo.couponName || couponDetail.couponName}}</view>
<glsx-image webp class="baseImage" src="mine/coupon/{{useMemberType == 0 || couponDetail.useMemberType == 0 ?'':'un-'}}{{couponDetail.discountType}}.png"></glsx-image>
</view>
<view class="time">
<view wx:if="{{couponDetail.effectiveType==3}}">永久有效</view>
<view wx:if="{{couponDetail.effectiveType==2}}">{{detailInfo.receiveStartTime || couponDetail.receiveStartTime}}-{{detailInfo.receiveEndTime || couponDetail.receiveEndTime}}</view>
<view wx:if="{{couponDetail.effectiveType==1}}">有效期至{{detailInfo.receiveEndTime || couponDetail.receiveEndTime}}</view>
</view>
</view>
<view class="lines"></view>
<view class="bottom flex">
<view class="title {{detailInfo.useMemberType == 0 || couponDetail.useMemberType == 0 ? 'qrText':'changeColor'}}">
<view class="flex" wx:if="{{couponDetail.discountType == 2}}">
<view class="discount" wx:if="{{couponDetail.discountIntensity}}">{{couponDetail.discountIntensity / 100}}</view>
<view class="discount_text" wx:if="{{couponDetail.discountIntensity}}">折</view>
<view class="discount_text_x" wx:if="{{couponDetail.useBarriers == 1}}">无门槛</view>
<view class="discount_text_x" wx:if="{{couponDetail.useBarriers == 2 && (detailInfo.full || couponDetail.full)}}">满{{detailInfo.full || couponDetail.full}}元可用</view>
</view>
</view>
<view class="qr">
<glsx-image webp src="{{qr}}"></glsx-image>
<block wx:if="{{useMemberType != 0}}">
<view class="mask text-center">
{{useMemberType==1?'已使用':'已失效'}}
</view>
</block>
</view>
<view class="code {{detailInfo.useMemberType == 0 || couponDetail.useMemberType == 0 ? 'darkColor':'numberColor'}}">{{verificationCode}}</view>
</view>
<view class="lines" style="margin: 20rpx 0 18rpx;"></view>
<view class="process">
<glsx-image webp src="mine/{{useMemberType == 0?'arrows':'unArrow'}}.png"></glsx-image>
<text class="process_text">导航到店</text>
<glsx-image webp class="rightArrow" src="mine/rightArrow.png" />
<glsx-image webp src="mine/{{useMemberType == 0?'car':'unCar'}}.png"></glsx-image>
<text class="process_text">开始服务</text>
<glsx-image webp class="rightArrow" src="mine/rightArrow.png" />
<glsx-image webp src="mine/{{useMemberType == 0?'ticket':'unTicket'}}.png"></glsx-image>
<text class="process_text">出示核销码</text>
</view>
</view>
</block>
</block>
<block wx:else>
<view class="qr-box box" style="padding: 0;">
<view class="btn-box">
<view class="flex">
<view class="title_text_X qrText">{{couponDetail.couponName}}</view>
<glsx-image webp class="baseImage" src="mine/coupon/{{couponDetail.discountType}}.png"></glsx-image>
</view>
<view class="times">
<view wx:if="{{couponDetail.effectiveType==3}}">永久有效</view>
<view wx:if="{{couponDetail.effectiveType==2}}">{{couponDetail.effectiveStartTime}}-{{couponDetail.effectiveEndTime}}</view>
<view wx:if="{{couponDetail.effectiveType==1 && detailInfo}}">有效期至{{couponDetail.receiveEndTime}}</view>
<view wx:if="{{couponDetail.effectiveType==1 && !detailInfo}}">领取后{{couponDetail.effectiveDays}}天内有效</view>
</view>
<view class="btn default-btn" bindtap="confirm">领取</view>
<view class="text">请点击领取按钮获取核销码</view>
</view>
</view>
</block>
<view class="qr-box box" style="padding-bottom: 32rpx;">
<view class="couponBox-X" style="padding-bottom: 16rpx;">
<view class="titleDay">有效日期:</view>
<view wx:if="{{couponDetail.effectiveType==3}}" class="titleDay_text darkColor">永久有效</view>
<view wx:if="{{couponDetail.effectiveType==2}}" class="titleDay_text darkColor">{{couponDetail.effectiveStartTime || couponDetail.receiveStartTime}}-{{couponDetail.effectiveEndTime || couponDetail.receiveEndTime}}</view>
<view wx:if="{{couponDetail.effectiveType==1 && detailInfo}}" class="titleDay_text darkColor">有效期至{{detailInfo.receiveEndTime || couponDetail.receiveEndTime}}</view>
<view wx:if="{{couponDetail.effectiveType==1 && !detailInfo}}" class="titleDay_text darkColor">领取后{{couponDetail.effectiveDays}}天内有效</view>
</view>
<view class="couponBox-X" style="padding-bottom: 16rpx;" wx:if="{{detailInfo}}">
<view class="titleDay">获取日期:</view>
<view class="titleDay_text darkColor">{{detailInfo.receiveTime || couponDetail.receiveTime}}</view>
</view>
<view class="couponBox-X" style="line-height: 44rpx;">
<view class="titleDay">使用说明:</view>
<view class="titleDay_text darkColor" style="white-space:pre-wrap">{{couponDetail.useDescription || ''}}</view>
</view>
</view>
<view class="qr-box box" wx:if="{{couponDetail.list.length}}">
<view class="an_title_text">使用记录</view>
<view wx:for="{{couponDetail.list}}" wx:key="index" class="note_line">
<view class="line_text_name">{{item.verificationMerchantName}}</view>
<view class="line_text">{{item.verificationTime}}</view>
<view class="line" wx:if="{{index < couponDetail.list.length - 1}}"></view>
</view>
</view>
<view class="qr-box box" wx:if="{{list.length}}">
<view class="storeTitle">适用商品</view>
<block wx:for="{{list}}" wx:key="index">
<view class="good" catchtap="jumpCommodity" data-item="{{item}}">
<view class="icons">
<glsx-image webp src="{{item.goodsImage}}"></glsx-image>
</view>
<view class="infos">
<view class="names">{{item.goodsName}}</view>
<view class="prices">
¥<view class="prices-X">{{item.retailPrice / 100}}</view>
</view>
</view>
</view>
<view class="liness" wx:if="{{index < list.length - 1}}"></view>
</block>
</view>
<!-- <block wx:if="{{couponDetail.suitMerchantLists && couponDetail.suitMerchantLists.length}}">
<view class="qr-box box" style="margin-bottom: 32rpx;">
<view class="storeTitle">适用门店</view>
<view wx:for="{{couponDetail.suitMerchantLists}}" wx:key="index" class="store-box">
<view class="storeName">{{item.merchantName}}</view>
<view wx:if="{{item.bussinessBegintime}}" class="businessTime">营业时间:{{item.bussinessBegintime}}-{{item.bussinessEndtime}}</view>
<view wx:else class="businessTime">营业时间:无</view>
<view class="line" wx:if="{{item.merchantAddress}}"></view>
<view class="addressBox" wx:if="{{item.merchantAddress}}">
<view style="width: 552rpx;padding-right: 24rpx;">{{item.merchantAddress}}</view>
<view class="navigation" catchtap="jump" data-item="{{item}}">
<glsx-image webp src="mine/icon-go.png"></glsx-image>
</view>
</view>
</view>
</view>
</block> -->
<!-- <block wx:else>
<view class="qr-box box" style="margin-bottom: 32rpx;">
<view class="storeTitle">适用门店</view>
<view class="storeName">{{couponDetail.merchantName}}</view>
<view wx:if="{{couponDetail.bussinessBegintime}}" class="businessTime">营业时间:{{couponDetail.bussinessBegintime}}-{{couponDetail.bussinessEndtime}}</view>
<view wx:else class="businessTime">营业时间:无</view>
<view class="line" wx:if="{{couponDetail.merchantAddress}}"></view>
<view class="addressBox" wx:if="{{couponDetail.merchantAddress}}">
<view style="width: 552rpx;padding-right: 24rpx;">{{couponDetail.merchantAddress}}</view>
<view class="navigation-X" catchtap="jumpMap">
<glsx-image webp src="mine/{{useMemberType == 0?'navigation':'unNavigation'}}.png"></glsx-image>
</view>
</view>
</view>
</block> -->
<view class="associationBox" wx:if="{{couponDetail.relatedGoodsId}}">
<view class="box-X">
<view class="title">关联商品</view>
<view class="goods">
<view class="icon">
<glsx-image webp src="{{couponDetail.relatedGoodsImage || ''}}"></glsx-image>
</view>
<view class="info">
<view>
<view class="name">{{couponDetail.relatedGoodsName || ''}}</view>
</view>
<view class="price">
¥<view class="price-X">{{couponDetail.relatedGoodsPrice || ''}}</view>
</view>
</view>
</view>
</view>
</view>
</view>