receiveCoupon.wxml
11.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
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
<!--pack-activity/pack/receiveCoupon.wxml-->
<wxs src="../../utils/util.wxs" module="util" />
<nav>优惠券详情</nav>
<view class="top_box">
<image src="https://qn.colorcun.com/{{couponType=='1'?'voucherIcon1':couponType=='2'?'coupon2':'coupon3'}}.png" mode="" />
<view class="texts" wx:if="{{detail.is_type == '3'}}">
<view class="font32r textName">{{detail.aname}}</view>
<view class="font24r threshold">¥<text class="priceText">{{detail.price}}</text><text class="font28r" wx:if="{{detail.desc!='0'}}">满{{detail.desc}}元可用</text></view>
</view>
<view class="texts texts{{couponType}}" wx:if="{{detail.is_type != '3'}}">
<view class="flex-lr">
<view class="font28r textName">{{detail.aname}}</view>
<view class="font20r">¥<text class="font32r">{{detail.price}}</text></view>
</view>
<view class="flex-lr">
<view class="font20r threshold">
<text class="priceText font36r" wx:if="{{detail.use.discount}}">{{detail.use.discount}}折</text>
<text class="font20r" wx:else>¥<text class="priceText font36r">{{detail.price}}</text></text>
{{detail.desc}}
</view>
<!-- <view class="operation" wx:if="{{opt.types!='5'}}">
<image class="countimgs" src="https://qn.colorcun.com/WechatIMG699.png" bindtap="subtraction" />
<input type="number" model:value="{{num}}" bindinput="bindKeyNameInput" />
<image class="countimgs" src="https://qn.colorcun.com/WechatIMG698.png" bindtap="addition" mode="" />
</view> -->
</view>
</view>
<view class="font28r receive" wx:if="{{resultCoupon == '1'}}">已领取</view>
</view>
<view class="center_box">
<view class="centerMain dishMain" wx:if="{{couponType == '3' && detail.use}}">
<view class="title">
<image src="https://qn.colorcun.com/voucherUnion_6.png" mode="" />
<text class="font32r">菜品</text>
</view>
<text space="nbsp" class="info font28r">{{detail.use.dish}}</text>
<image wx:for="{{detail.use.images}}" src="{{item}}" mode="widthFix"/>
</view>
<view class="centerMain">
<view class="title">
<image src="https://qn.colorcun.com/voucherUnion_1.png" mode="" />
<text class="font32r">有效期</text>
</view>
<block wx:if="{{detail.is_type == '3'}}">
<view class="info font28r" wx:if="{{detail.aexpiration.valid_forever == '0' && detail.useStime && detail.useEtime}}"><text>券有效期:</text>
<block wx:if="{{resultCoupon == '1'}}">
{{detail.useStime}} <text> 至 </text> {{detail.useEtime}}
</block>
<block wx:else>
{{detail.useEtimeStr}}
</block>
</view>
<view class="info font28r" wx:if="{{detail.aexpiration.valid_forever == '1'}}"><text>券有效期:</text> 永久有效</view>
</block>
<block wx:else>
<view class="info font28r" wx:if="{{detail.useStime && detail.useEtime}}"><text>活动期限:</text>{{detail.useStime}} <text> 至 </text> {{detail.useEtime}}</view>
</block>
</view>
<view class="centerMain" wx:if="{{detail.morText || detail.noonText || detail.nigText}}">
<view class="title">
<image src="https://qn.colorcun.com/voucherUnion_2.png" mode="" />
<text class="font32r">{{detail.is_type=='3'?'不':''}}可用日期</text>
</view>
<view wx:if="{{detail.morText}}" class="info font28r">{{detail.morText}}</view>
<view wx:if="{{detail.noonText}}" class="info font28r">{{detail.noonText}}</view>
<view wx:if="{{detail.nigText}}" class="info font28r">{{detail.nigText}}</view>
</view>
<view class="centerMain" wx:if="{{detail.is_type!='3' && exp_date.is_none=='1'}}">
<view class="title">
<image src="https://qn.colorcun.com/voucherUnion_1.png" mode="" />
<text class="font32r">可用日期</text>
</view>
<view wx:if="{{exp_date.is_none=='1'}}" class="info font28r" >
无限制
</view>
</view>
<view class="centerMain centerMain3" wx:if="{{detail.aexpiration && detail.is_type == '3'}}">
<view class="title">
<image src="https://qn.colorcun.com/voucherUnion_3.png" mode="" />
<text class="font32r">使用规则</text>
</view>
<view class="info font28r">
<view class="drop"></view>{{detail.arule.is_accumulation == '1' ? '可以叠加使用其他优惠券' : '不可以叠加使用其他优惠券'}}
</view>
<view class="info font28r">
<view class="drop"></view>{{detail.arule.is_compartment == '1' ? '可用于包间消费' : '不可用于包间消费'}}
</view>
<view class="info font28r">
<view class="drop"></view>{{detail.arule.is_eatin == '1' ? '堂食可用' : '不可用于堂食消费'}}
</view>
<view class="info font28r">
<view class="drop"></view>{{detail.arule.is_takeout == '1' ? '外带可用' : '不可用于外带'}}
</view>
<view class="info font28r">
<view class="drop"></view>{{detail.arule.is_appointment == '1' ? '需要提前预约' : '不需要提前预约'}}
</view>
</view>
<view class="centerMain centerMain3" wx:if="{{exp_date && exp_date.is_birthday=='1' && detail.is_type != '3'}}">
<view class="title">
<image src="https://qn.colorcun.com/voucherUnion_3.png" mode="" />
<text class="font32r">使用限制</text>
</view>
<view class="info font28r">
顾客生日当天可用
</view>
</view>
<view class="centerMain" wx:if="{{detail.single_use_limit && ((detail.single_use_limit*1) > 0)}}">
<view class="title">
<image src="https://qn.colorcun.com/restrictionsIcon.png" mode="" />
<text class="font32r">使用限制</text>
</view>
<view class="info font28r">
单次可用{{detail.single_use_limit}}张
</view>
</view>
<view class="centerMain" wx:if="{{detail.is_type == '3'}}">
<view class="title">
<image src="https://qn.colorcun.com/voucherUnion_4.png" mode="" />
<text class="font32r">分享规则</text>
</view>
<view class="info font28r">
<view class="drop"></view>{{detail.arule.is_share_lose == '1'? '可以分享给好友' : '不能分享给好友'}}
</view>
<view class="info font28r">
<view class="drop"></view>{{detail.arule.is_share_have == '1'? '分享给好友后继续拥有此券' : '分享给好友后不再拥有此券'}}
</view>
</view>
<view class="centerMain" wx:if="{{detail.explain}}">
<view class="title">
<image src="https://qn.colorcun.com/voucherUnion_5.png" mode="" />
<text class="font32r">其他说明</text>
</view>
<view class="info font28r">{{detail.explain}}</view>
</view>
</view>
<view class="seller_data">
<image src="{{seller.seller_image}}" mode="aspectFill"/>
<view class="seller_box">
<view class="infos">
<view class="info_name font32r">{{seller.sellername}}</view>
<view class="park font24r" wx:if="{{seller.is_parking}}">可停车</view>
</view>
<view class="infos infos1">
<view class="dish font24r">{{seller.cateStr}}</view>
<view class="averageText font24r" wx:if="{{seller.average && seller.average>0}}">人均¥{{seller.average}}</view>
<view class="font24r">{{distance}}</view>
</view>
<!-- <view class="bottom_btns">
<view class="book font24r">朋友订过</view>
<view class="book font24r">我订过</view>
<view class="book font24r">我去过</view>
<view class="book font24r">我有券</view>
</view> -->
</view>
</view>
<view class="bottom_box_wrap">
<view class="bottom_box">
<view class="font32r bold_box">温馨提示:</view>
<view class="font28r">1、到店消费时,请您扫描商家二维码付款时,可以直接识别并使用优惠券</view>
<view class="font28r">2、从<text class="bold_box">周到安排</text>微信小程序,<text class="bold_box">“我的-卡券”</text>中,可以找到您的卡券。</view>
<view class="font28r">3、您也可以关注<text class="bold_box">周到安排</text>公众号,获取更多优惠券信息</view>
<view class="font28r publicity" bindtap="wananchi">关注<text class="bold_box">周到安排</text>公众号,及时获取更多优惠券动态<view class="more" style="margin-left: 20rpx;"></view>
</view>
</view>
</view>
<view class="sharewidth {{detail.is_type != '3'?'sharewidth1':''}}" wx:if="{{opt.types!='5' && (resultCoupon == '0' || detail.arule.is_share_lose == '1')}}">
<block wx:if="{{detail.is_type == '3'}}">
<button wx:if="{{detail.arule.is_share_lose == '1'}}" class="shareBtn" open-type="share">
<image src="https://qn.colorcun.com/voucherIcon2.png" mode="" />
<text class="font24r">分享</text>
</button>
<view class="btns">
<view class="btn1 font36r" wx:if="{{marketing && marketing.is_online_book=='1' && seller.is_online_reserve == '1'}}">
<navigator url="/pages/reserve/reserve?id={{opt.sid}}&activeTab=reserve" class="book-item-font second-book-button flex-cc font30r" style="position: relative;">预订包间</navigator>
</view>
<view class="btn font36r" wx:if="{{(marketing.is_online_book=='0' || seller.is_online_reserve == '0') && seller.tel && seller.tel.length>0}}">
<view bindtap="callPhone">预订包间</view>
</view>
<!-- 已过期的券可以重复领取 && 活动有效期不是几号至几号 -->
<block wx:if="{{(resultCoupon == '0' && detail.grant_last>0) || (detail.useEtimeNum<dataStr && detail.fixedTime!='1')}}">
<block wx:if="{{!purePhoneNumber}}">
<button open-type="getPhoneNumber" bindgetphonenumber="getPhoneNumberCouponFun" class="btn font28r">领取到卡包</button>
</block>
<block wx:else>
<subscribe ids="{{[2]}}" bindtap="submitOrder">
<view class="btn font36r">领取到卡包</view>
</subscribe>
</block>
</block>
</view>
</block>
<block wx:else>
<view class="leftBox" wx:if="{{detail.is_type != '3'}}">
<view class="news font24r">
合计<text class="font28r">¥<text class="priceInfo">{{totalize}}</text></text>
</view>
</view>
<button bindtap="submitOrderTwo" wx:if="{{detail.is_type != '3'}}" class="font32r {{(dataStr>(detail.etime*1) || detail.grant_last=='0' || (detail.grant_last && (detail.grant_last*1)<(num*1)))?'submitBtns btnsDisabled':'submitBtns'}}">提交订单</button>
</block>
</view>
<toast id="myToast"></toast>
<my-modal id="myModal" fadeStyle="slideUp" height="240px">
<view slot="modalName" class="titleModal">
<image bindtap="closeCouponModal" class="closeImg" src="https://qn.colorcun.com/closeOutline.png" mode=""/>
<view class="modalText1">您来晚了!</view>
</view>
<view slot="modalContent">
<view class="modalText2 font40r">优惠券已被其他好友抢走了,下次动作要快哦!</view>
<view bindtap="closeCouponModal" class="couponBtn font36r">我知道了</view>
</view>
</my-modal>