Commit 3262acf283e5c25ebc93a11a15ff2af2b1028770

Authored by vking
1 parent c1663ffd

pay

... ... @@ -70,8 +70,14 @@ Page({
is_wine:0,
is_pack:0,
checkoutData(e){
console.log(e)
this[util.attr(e,'type')]=util.val(e)?1:0
this.is_wine=0
this.is_pack=0
if(e.detail.value.length>0){
e.detail.value.forEach(k=>{
this[k]=1
})
}
console.log(e.detail.value,this.is_wine,this.is_pack)
},
checkoutInit(){
let params={
... ...
... ... @@ -7,17 +7,19 @@
</view>
<!--//买单相关(可选)-->
<block wx:if="{{true || checkout.status<1}}">
<checkbox-group bindchange="checkoutData">
<view class="content checkout">
<view class="title">买单相关(可选)</view>
<view class="item flex-lr">
<view>剩余酒水饮料需要退</view>
<checkbox color="#ffffff" checked bindchange="checkoutData" data-type="is_wine"/>
<checkbox color="#ffffff" value="is_wine"/>
</view>
<view class="item flex-lr">
<view>菜品打包</view>
<checkbox color="#ffffff" bindchange="checkoutData" data-type="is_pack"/>
<checkbox color="#ffffff" value="is_pack"/>
</view>
</view>
</checkbox-group>
<view class="checkout-get" bindtap="checkoutInit">获取消费金额</view>
</block>
<block wx:elif="{{checkout.status==1}}">
... ...