parts.wxml
11.4 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
<!-- 公共 wxml 片段(template):页面用 <import src="../common/parts.wxml" /> 引入 -->
<!-- richText 富文本:content 为数组,项 {type: 1图片/2文字/3视频, content}; imgs 可选整组预览图; textClass 文字字号类 -->
<template name="richText">
<block wx:for="{{content}}" wx:key="index">
<image wx:if="{{item.type == '1'}}" bindtap="lookImgs" src="{{item.content}}" data-url="{{item.content}}" data-imgs="{{imgs}}" mode="widthFix" /><text wx:if="{{item.type == '2'}}" space="nbsp" class="texts {{textClass}}">{{item.content}}</text>
<view wx:if="{{item.type == '3'}}" class="videoBox">
<video object-fit="contain" autoplay="{{true}}" loop="{{true}}" muted="{{true}}" show-mute-btn="{{true}}" vslide-gesture-in-fullscreen="{{true}}" src="{{item.content}}"></video>
</view>
</block>
</template>
<!-- 截屏提示弹窗 -->
<template name="payModal">
<my-modal id="payModal" fadeStyle="slideUp" height="240px">
<view slot="modalName" class="titleModal">提示</view>
<view slot="modalContent">
<view class="explain">检测到您正在截屏,建议直接把邀请函转发给朋友更有仪式感哦!</view>
<view class="screenshotBtns">
<button class="font32r btnsLeft" bindtap="closeModal">关闭弹窗</button><button wx:if="{{detail.status !='4' && options.isOrder != '1' && marketing.is_transpond=='1' && imgSrc}}" class="flex-cc font30r btnsRight" open-type="share">立即转发</button>
</view>
</view>
</my-modal>
</template>
<!-- 音乐开关 -->
<template name="musicImg">
<image wx:if="{{newStr}}" class="musicImg" src="{{isPlay=='1'?'https://qn.colorcun.com/open.svg':'https://qn.colorcun.com/close.svg'}}" bindtap="stopMusic" animation="{{attentionAnim}}" />
</template>
<!-- 商家有礼悬浮入口 -->
<template name="giftImg">
<image class="giftImg {{(hasValueCertificate && marketing && coupon_dataList.length>0) && isFrame == '0' ? 'giftImg1' : '' }}" bindtap="gotoSellerGift" data-form="1" animation="{{animationData2}}" wx:if="{{(hasValueCertificate && marketing && coupon_dataList.length>0) || (is_comments=='1' && !is_user_comments && marketing.is_comments_coupon=='1' && couponData && couponData.showCoupon =='1') || (hasValueRecharge && marketing && marketing.is_recharge=='1' && recharge_data)}}" src="https://nosqn.colorcun.com/sellerGiftTwo.png" mode="" />
</template>
<!-- 领券全屏浮层 -->
<template name="fullscreenMask">
<view class="fullscreenMask" animation="{{animationData}}" wx:if="{{isShow=='1'}}">
<image src="https://qn.colorcun.com/getCouponIcon2.png" mode="" />
</view>
</template>
<!-- 已取消/已结束 状态角标 -->
<template name="statusBadge">
<image wx:if="{{detail && detail.status =='4'}}" class="cannotImg" src="https://qn.colorcun.com/cancelImg.png" />
<image wx:if="{{options && options.isOrder == '1' && detail.status !='4'}}" class="cannotImg" src="https://qn.colorcun.com/overImg.png" />
</template>
<!-- 优惠券列表卡片(2~9 版) -->
<template name="couponCard">
<block wx:for="{{list}}" wx:key="index" wx:for-index="index">
<navigator wx:if="{{item.resultCoupon || !item.resultCoupon || item.is_type != '3'}}" url="/pack-activity/pack/receiveCoupon?id={{item.id}}&sid={{seller.sid}}&oid={{detail.id}}&types=1&StyleType={{StyleType}}&types=1&StyleType={{StyleType}}" hover-class="navigator-hover">
<view class="preferentialItems">
<view class="itemLeft">
<text wx:if="{{item.discount!='0.00' && (item.use.is_cash=='1' || item.use.is_cash) && item.discount}}" class="discountText font24r">{{item.discount}}折</text>
<view class="discountText1 font20r {{item.arule.is_accumulation == '1'?'discountText2':'discountText3'}}" wx:if="{{item.is_type == '3'}}">{{item.arule.is_accumulation == '1' ? '可' : '不可'}}叠加</view>
<view class="priceText" wx:if="{{item.price}}">
<view class="icons font24r">¥</view><text class="font48r">{{item.price}}</text>
</view>
<view class="icons font20r" wx:if="{{item.is_type == '3' && item.desc!='0'}}">消费满{{item.desc}}元可用</view>
</view>
<view class="couponLine"></view>
<view class="itemRight">
<view class="btns">
<text class="font32r anameText">{{item.aname}}</text>
<block wx:if="{{item.is_type == '1' || item.is_type == '2'}}">
<text wx:if="{{item.exp_date.is_week=='1' || item.exp_date.is_week===true}}" class="bottom font24r">{{item.exp_date.week_show?item.exp_date.week_show+'可用':''}}{{item.desc?','+item.desc+'。':'。'}}</text>
<view wx:if="{{item.exp_date.is_none=='1' || item.exp_date.is_none===true}}" class="bottom font24r">无限制{{item.desc?','+item.desc+'。':'。'}}</view>
<view wx:if="{{item.exp_date.is_birthday=='1' || item.exp_date.is_birthday===true}}" class="bottom font24r">会员生日当天可用{{item.desc?','+item.desc+'。':'。'}}</view>
</block>
<block wx:if="{{item.is_type == '3' || item.is_type == '4'}}">
<view wx:if="{{(item.useStime && item.useEtime) || item.foreverText}}" class="bottom font24r">有效期:{{item.foreverText?item.foreverText : ''}}</view>
<view wx:if="{{item.useStime && item.useEtime}}" class="bottom font24r nodate">{{item.useStime}} 至 {{item.useEtime}}</view>
<view wx:if="{{item.morText || item.noonText || item.noonText}}" class="bottom font24r">不可用日期:</view>
<view wx:if="{{item.morText}}" class="bottom font24r nodate">{{item.morText}}</view>
<view wx:if="{{item.noonText}}" class="bottom font24r nodate">{{item.noonText}}</view>
<view wx:if="{{item.nigText}}" class="bottom font24r nodate">{{item.nigText}}</view>
<view wx:if="{{item.exp_date.week_show=='无'}}" class="bottom font24r">无使用时间限制</view>
<view wx:if="{{item.is_type == '4' && item.desc!='0'}}" class="bottom font24r">消费满{{item.desc}}元可用</view>
</block>
</view>
<view class="btnBox" wx:if="{{item.is_type == '3'}}">
<view class="font24r orderingFood {{item.resultCoupon == '1'?'orderingFood1':'orderingFood2'}}">{{item.resultCoupon == '1'?'已领取':'领取'}}</view>
<view class="grantNum" wx:if="{{item.receiveNumText}}">
<view class="font24r">已被领取</view>
<view class="font24r">
<text>{{item.receiveNumText}}</text>
张
</view>
</view>
</view>
<view wx:if="{{item.is_type != '3'}}" class="font24r orderingFood">立即抢购</view>
</view>
</view>
</navigator>
</block>
</template>
<!-- 充值卡(2,3,4,5,7,8,9 版) -->
<template name="rechargeCard">
<view class="preferentialItems rechargeItems">
<view class="itemLeft">
<view class="itemTop font36r">{{recharge_data.rname}}</view>
<view class="itemBottom font24r" wx:if="{{priceInfo}}">{{priceInfo}}{{(recharge_data.recharge_list.is_coupons=='0' && recharge_data.recharge_list.is_score=='0')?'。':';'}}</view>
<view class="bottom font24r" wx:if="{{scoreInfo}}">{{scoreInfo}}{{recharge_data.recharge_list.is_coupons=='0'?'。':';'}}</view>
<view class="bottom font24r" wx:if="{{recharge_data.recharge_list.is_coupons=='1'}}">{{recharge_data.recharge_list.is_coupons=='1'?'会员充值满'+recharge_data.recharge_money+'元赠送'+certificate:''}}。</view>
</view>
<view class="font24r orderingFood">抢购</view>
</view>
</template>
<!-- 领券弹窗(2~12 通用;13 保持页面内独立) -->
<template name="couponModal">
<my-modal id="couponModal" fadeStyle="slideUp" height="240px">
<view slot="modalContent">
<view class="titleModal">
<image bindtap="closeCouponModal" class="closeImg" src="https://qn.colorcun.com/closeImg4.png" mode="" />
<view class="nameInfo font28r">{{seller.name||reserve.seller_name}}</view>
<view class="couponTotal font28r" wx:if="{{totalPrice}}">
赠送给您代金券
<view class="counterText">
<view class="font36r">¥</view>
<scroll-number value="{{totalPrice}}"></scroll-number>
</view>
</view>
</view>
<view class="couponWrap">
<view class="couponInfo font48r">
<text class="font48r">到店微信扫码</text>
<text class="font48r">自动识别</text>
</view>
<block wx:if="{{!purePhoneNumber}}">
<button open-type="getPhoneNumber" bindgetphonenumber="getPhoneNumberCouponFun" class="couponBtn font28r">欣然收下</button>
</block>
<block wx:else>
<subscribe ids="{{[2]}}" bindtap="setcouponFun">
<view class="couponBtn couponBtn1 font40r">欣然收下</view>
</subscribe>
</block>
<view class="couponText font24r" bindtap="gotoSellerGift" data-form="2">查看更多</view>
</view>
<view class="closeBox font28r">{{countDown}} 秒后自动关闭</view>
</view>
</my-modal>
</template>
<!-- 底部操作栏(2~12 通用;barWrapClass 区分外层样式;13 保持页面内独立) -->
<template name="actionBar">
<view wx:if="{{barShow}}" class="{{barWrapClass}}">
<view wx:if="{{showMoreOnline}}" class="flex-cc font30r moreBtn {{threeBtnMore}}" bindtap="secondbook">再次预订</view>
<view wx:if="{{showMoreCall}}" class="flex-cc font30r moreBtn {{threeBtnCall}}" bindtap="call" data-phone="{{seller.phone}}">再次预订</view>
<view wx:if="{{canPay}}" class="flex-cc font30r paymenBtn {{threeBtnPay}}" bindtap="paymentFun">支付定金</view>
<block wx:if="{{isOwner}}">
<button wx:if="{{canShare}}" class="flex-cc font30r shareItem" open-type="share">转发邀请函给客人</button>
<button wx:if="{{isOver}}" class="flex-cc font30r shareItem" data-type="2" open-type="share">转发店铺给好友</button>
</block>
<block wx:else>
<button wx:if="{{canShare}}" class="flex-cc font30r {{guestShareCls}}" open-type="share">转发邀请函</button>
<button wx:if="{{isOver}}" class="flex-cc font30r {{guestShareCls}}" data-type="2" open-type="share">转发邀请函</button>
<block wx:if="{{canMeet}}">
<button wx:if="{{needLogin}}" bind:tap="gotoLogin" data-types="2" class="flex-cc font30r shareItem">确认赴约</button>
<button wx:else bind:tap="confirmed" class="flex-cc font30r shareItem">确认赴约</button>
</block>
</block>
</view>
</template>