Commit 3262acf283e5c25ebc93a11a15ff2af2b1028770

Authored by vking
1 parent c1663ffd

pay

@@ -70,8 +70,14 @@ Page({ @@ -70,8 +70,14 @@ Page({
70 is_wine:0, 70 is_wine:0,
71 is_pack:0, 71 is_pack:0,
72 checkoutData(e){ 72 checkoutData(e){
73 - console.log(e)  
74 - this[util.attr(e,'type')]=util.val(e)?1:0 73 + this.is_wine=0
  74 + this.is_pack=0
  75 + if(e.detail.value.length>0){
  76 + e.detail.value.forEach(k=>{
  77 + this[k]=1
  78 + })
  79 + }
  80 + console.log(e.detail.value,this.is_wine,this.is_pack)
75 }, 81 },
76 checkoutInit(){ 82 checkoutInit(){
77 let params={ 83 let params={
@@ -7,17 +7,19 @@ @@ -7,17 +7,19 @@
7 </view> 7 </view>
8 <!--//买单相关(可选)--> 8 <!--//买单相关(可选)-->
9 <block wx:if="{{true || checkout.status<1}}"> 9 <block wx:if="{{true || checkout.status<1}}">
  10 + <checkbox-group bindchange="checkoutData">
10 <view class="content checkout"> 11 <view class="content checkout">
11 <view class="title">买单相关(可选)</view> 12 <view class="title">买单相关(可选)</view>
12 <view class="item flex-lr"> 13 <view class="item flex-lr">
13 <view>剩余酒水饮料需要退</view> 14 <view>剩余酒水饮料需要退</view>
14 - <checkbox color="#ffffff" checked bindchange="checkoutData" data-type="is_wine"/> 15 + <checkbox color="#ffffff" value="is_wine"/>
15 </view> 16 </view>
16 <view class="item flex-lr"> 17 <view class="item flex-lr">
17 <view>菜品打包</view> 18 <view>菜品打包</view>
18 - <checkbox color="#ffffff" bindchange="checkoutData" data-type="is_pack"/> 19 + <checkbox color="#ffffff" value="is_pack"/>
19 </view> 20 </view>
20 </view> 21 </view>
  22 + </checkbox-group>
21 <view class="checkout-get" bindtap="checkoutInit">获取消费金额</view> 23 <view class="checkout-get" bindtap="checkoutInit">获取消费金额</view>
22 </block> 24 </block>
23 <block wx:elif="{{checkout.status==1}}"> 25 <block wx:elif="{{checkout.status==1}}">