Commit 219317edfa4cceadd84193cec70d1924f64ab234
1 parent
d18113ee
购物车不同门店一起下单,使用余额的bug修复
Showing
1 changed file
with
8 additions
and
6 deletions
pages/cart/cart2/cart2.js
@@ -625,6 +625,8 @@ Page({ | @@ -625,6 +625,8 @@ Page({ | ||
625 | th.data.cartlist[i].user_money = umoney; | 625 | th.data.cartlist[i].user_money = umoney; |
626 | umoney=0; | 626 | umoney=0; |
627 | } | 627 | } |
628 | + }else{ | ||
629 | + th.data.cartlist[i].user_money=0; | ||
628 | } | 630 | } |
629 | 631 | ||
630 | th.data.cartlist[i].user_money = parseFloat(th.data.cartlist[i].user_money).toFixed(2); | 632 | th.data.cartlist[i].user_money = parseFloat(th.data.cartlist[i].user_money).toFixed(2); |
@@ -635,12 +637,12 @@ Page({ | @@ -635,12 +637,12 @@ Page({ | ||
635 | th.data.cartlist[i].goods_price = o_price.toFixed(2); | 637 | th.data.cartlist[i].goods_price = o_price.toFixed(2); |
636 | th.data.cartlist[i].order_amount= th.data.cartlist[i].order_amount- th.data.cartlist[i].user_money; //会员使用余额 | 638 | th.data.cartlist[i].order_amount= th.data.cartlist[i].order_amount- th.data.cartlist[i].user_money; //会员使用余额 |
637 | 639 | ||
638 | - all_price += o_price; | ||
639 | - all_total_m += th.data.cartlist[i].total_amount; | ||
640 | - all_shipping_m += th.data.cartlist[i].shipping_price; | ||
641 | - all_order_m += th.data.cartlist[i].order_amount; | ||
642 | - all_user_m += th.data.cartlist[i].user_money; | ||
643 | - all_coupon_price_m+=th.data.cartlist[i].coupon_price; | 640 | + all_price += parseFloat(o_price); |
641 | + all_total_m += parseFloat(th.data.cartlist[i].total_amount); | ||
642 | + all_shipping_m += parseFloat(th.data.cartlist[i].shipping_price); | ||
643 | + all_order_m += parseFloat(th.data.cartlist[i].order_amount); | ||
644 | + all_user_m += parseFloat(th.data.cartlist[i].user_money); | ||
645 | + all_coupon_price_m+= parseFloat(th.data.cartlist[i].coupon_price); | ||
644 | 646 | ||
645 | 647 | ||
646 | } | 648 | } |