comboBuy.wxml
5.14 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
<!--pack-cookbook/pages/comboBuy.wxml-->
<nav>套餐购买</nav>
<!-- 商家信息 -->
<view class="sellInfo">
<image src="{{seller.seller_image}}" mode="aspectFill" />
<view class="nameInfo font32r">{{seller.sellername}}</view>
</view>
<!-- 套餐信息 -->
<view class="comboCard">
<view class="priceRow">
<text class="label font28r">套餐名称</text>
<view class="valueText font28r">{{details.pname}}</view>
</view>
<view class="priceRow" wx:if="{{memberPrice}}">
<text class="label font28r">菜品原价</text>
<view class="memberPrice font28r">¥ {{memberPrice}}</view>
</view>
<view class="priceRow">
<text class="label font28r">套餐价格</text>
<view class="valueText font28r">¥ {{planPrice}}</view>
</view>
<view bindtap="showCouponModal" class="priceRow couponsBox colorOrange">
<view class="couponLeft font28r">选择优惠券</view>
<view class="couponRight">
<text wx:if="{{discountPrice && discountPrice!='0.00' && couponSwitch}}">- ¥ {{discountPrice}}</text>
<text class="noUse font28r" wx:if="{{couponArr.length == 0}}">暂无可用</text>
<view class="more"></view>
</view>
</view>
<view class="priceRow">
<text class="label font28r">抵扣后</text>
<view class="valueText font28r">¥ {{actualPrice}}</view>
</view>
</view>
<view class="bottomBox"></view>
<!-- 底部支付 -->
<view class="payBtnBox">
<view class="total">合计<text>¥ {{actualPrice}}</text></view>
<view class="payBtn font32r" bindtap="submitPay">支付</view>
</view>
<!-- 使用优惠券弹框 -->
<my-modal id="couponModal" fadeStyle="slideUp" height="{{couponArr.length > 3 ? '80%' : '60%'}}">
<view slot="modalName" class="titleModal">
<image bind:tap="closeCouponModal" src="https://qn.colorcun.com/closeImg1.png" mode="aspectFit" />
<view class="couponTotalText font28r">所有优惠券</view>
<view bindtap="checkCertificate" class="btn font32r">确认</view>
</view>
<view slot="modalContent">
<view class="infoBox">
<view class="infoTop">
<view class="info font28r">本单使用优惠券</view>
<switch checked="{{couponSwitch}}" bindchange="switchChange" color="#09BB07" class="infoSwitch" />
</view>
<view class="infoBottom font24r">选择优惠券后可抵扣套餐价格</view>
</view>
<scroll-view class="couponBox" scroll-y="true">
<view wx:for="{{couponArr}}" data-aid="{{item.aid}}" class="couponItems {{item.showCpupon == '0' ? 'couponNo' : ''}}" wx:key="groupKey">
<view class="itemLeft">
<view class="priceText" wx:if="{{item.price}}">
<view class="icons font24r">¥</view><text class="priceText">{{item.price}}</text>
</view>
<view class="icons font20r" wx:if="{{item.desc && item.desc != '0'}}">消费满{{item.desc}}元可用</view>
<view class="icons font20r" wx:else>无门槛</view>
</view>
<view class="itemRight">
<view class="anameText">
<view class="anameInfo">
<view class="names font40r">{{item.aname}}</view>
<view class="discountText1 font20r">{{item.accumulationShow == '1' ? '可' : '不可'}}叠加</view>
</view>
</view>
<view wx:if="{{item.endDateStr}}" class="font20r bottomTitle">有效日期:<view class="bottom font20r">{{item.endDateStr}}</view>
</view>
<view wx:if="{{item.morText || item.noonText || item.nigText}}" class="font20r bottomTitle"><text>不可使用:</text>
<view class="textBox">
<view wx:if="{{item.morText}}" class="bottom font20r">{{item.morText}}</view>
<view wx:if="{{item.noonText}}" class="bottom font20r">{{item.noonText}}</view>
<view wx:if="{{item.nigText}}" class="bottom font20r">{{item.nigText}}</view>
</view>
</view>
<view wx:if="{{item.exp_date.week_show=='无'}}" class="bottom font20r">无使用时间限制</view>
</view>
<view class="rightBox">
<view class="ownNum font20r">拥有{{item.num}}张</view>
<view class="numBox">
<view class="numBtn {{item.checkedNum == 0 ? 'numBtnDisabled' : ''}}" bindtap="changeCouponNum" data-aid="{{item.aid}}" data-type="minus">-</view>
<input class="numText" type="number" value="{{item.checkedNum}}" data-aid="{{item.aid}}" disabled="{{item.showCpupon == '0'}}" bindinput="numInputChange" />
<view class="numBtn {{item.canAdd != '1' ? 'numBtnDisabled' : ''}}" bindtap="changeCouponNum" data-aid="{{item.aid}}" data-type="plus">+</view>
</view>
</view>
</view>
</scroll-view>
</view>
</my-modal>