Commit 942c493e3f28b3093f232796182ef16c4dad1428
1 parent
06e54515
购物车的金额问题
Showing
1 changed file
with
4 additions
and
4 deletions
pages/cart/cart2/cart2.js
... | ... | @@ -610,11 +610,11 @@ Page({ |
610 | 610 | coupon_price=o_price; |
611 | 611 | } |
612 | 612 | |
613 | - th.data.cartlist[i].total_amount+=th.data.cartlist[i].shipping_price; //总金额 | |
614 | - th.data.cartlist[i].order_amount+=th.data.cartlist[i].shipping_price; //总金额 | |
613 | + th.data.cartlist[i].total_amount= parseFloat(th.data.cartlist[i].total_amount)+parseFloat(th.data.cartlist[i].shipping_price); //总金额 | |
614 | + th.data.cartlist[i].order_amount=parseFloat(th.data.cartlist[i].order_amount)+parseFloat(th.data.cartlist[i].shipping_price); //总金额 | |
615 | 615 | |
616 | - th.data.cartlist[i].total_amount= parseFloat(th.data.cartlist[i].total_amount).toFixed(2); | |
617 | - th.data.cartlist[i].order_amount=parseFloat(th.data.cartlist[i].order_amount).toFixed(2); | |
616 | + th.data.cartlist[i].total_amount= th.data.cartlist[i].total_amount.toFixed(2); | |
617 | + th.data.cartlist[i].order_amount=th.data.cartlist[i].order_amount.toFixed(2); | |
618 | 618 | |
619 | 619 | //--------------如果使用余额--------------------- |
620 | 620 | if (th.data.js_use_money == 1) { | ... | ... |