diff --git a/packageC/pages/presell/cart/cart.js b/packageC/pages/presell/cart/cart.js index dbf1b36..3071d1f 100644 --- a/packageC/pages/presell/cart/cart.js +++ b/packageC/pages/presell/cart/cart.js @@ -655,8 +655,12 @@ Page({ } }) }else{ - var txt="using_quan["+bn_pick+"]"; - th.setData({[txt]:{}}); + th.setData({quan_price:0}); + if(th.data.using_quan[bn_pick].isby==1){ + var txt="using_quan["+bn_pick+"]"; + th.setData({[txt]:{}}); + } + } if(quan_price>0){ @@ -1724,15 +1728,17 @@ Page({ } }) - if(quan_price>0) { - if (quan_price 0) { + if (quan_price < th.data.tail_pay) th.setData({quan_price: quan_price}) else { - th.setData({quan_price: th.data.tail_pay}) - quan_price=th.data.tail_pay; + th.setData({quan_price: th.data.tail_pay}) + quan_price = th.data.tail_pay; } - }else{ + } else { th.setData({quan_price: 0}) } + }else{ + th.setData({quan_price: 0}) } }else{ th.setData({quan_price: 0}) @@ -1906,7 +1912,13 @@ Page({ //显示支付选择 show_pay: function () { - this.setData({show_pay_type: 1}); + //不用钱直接支付 + if(this.data.order_m<=0){ + this.to_pay_type(1); + }else{ + this.setData({show_pay_type: 1}); + } + }, //关闭支付 close_show_pay: function () { diff --git a/packageC/pages/presell/cart/cart.wxml b/packageC/pages/presell/cart/cart.wxml index 00dfd2e..27587d7 100644 --- a/packageC/pages/presell/cart/cart.wxml +++ b/packageC/pages/presell/cart/cart.wxml @@ -340,8 +340,8 @@ {{filters.toFix(order_m,2)}} - - + +