Commit 569ffcad02ed9b8331d38e1e16b2f7c65ec0e25b

Authored by yvan.ni
1 parent fb571d79

1. 在使用余额的时候的报警

pages/cart/cart2/cart2.js
@@ -1658,10 +1658,10 @@ Page({ @@ -1658,10 +1658,10 @@ Page({
1658 //--------------如果使用余额--------------------- 1658 //--------------如果使用余额---------------------
1659 if (th.data.bn_use_money == 1) { 1659 if (th.data.bn_use_money == 1) {
1660 if (amoney> order_m) { 1660 if (amoney> order_m) {
1661 - order_m = order_m.toFixed(2); 1661 + order_m = parseFloat(order_m).toFixed(2);
1662 th.setData({ [txt]: order_m, [txt2]:0,[txt3]:coupon_price,show_submit:1 }) 1662 th.setData({ [txt]: order_m, [txt2]:0,[txt3]:coupon_price,show_submit:1 })
1663 }else{ 1663 }else{
1664 - order_m =parseFloat(order_m - amoney); 1664 + order_m =parseFloat(order_m) - parseFloat(amoney);
1665 order_m = order_m.toFixed(2); 1665 order_m = order_m.toFixed(2);
1666 th.setData({ [txt]: amoney, [txt2]: order_m,[txt3]:coupon_price,show_submit:1 }) 1666 th.setData({ [txt]: amoney, [txt2]: order_m,[txt3]:coupon_price,show_submit:1 })
1667 } 1667 }
@@ -1709,10 +1709,10 @@ Page({ @@ -1709,10 +1709,10 @@ Page({
1709 //--------------如果使用余额--------------------- 1709 //--------------如果使用余额---------------------
1710 if (th.data.bn_use_money == 1) { 1710 if (th.data.bn_use_money == 1) {
1711 if (amoney> order_m) { 1711 if (amoney> order_m) {
1712 - order_m = order_m.toFixed(2); 1712 + order_m = parseFloat(order_m).toFixed(2);
1713 th.setData({ [txt]: order_m, [txt2]:0,[txt3]:coupon_price,show_submit:1 }) 1713 th.setData({ [txt]: order_m, [txt2]:0,[txt3]:coupon_price,show_submit:1 })
1714 }else{ 1714 }else{
1715 - order_m =parseFloat(order_m - amoney); 1715 + order_m =parseFloat(order_m) - parseFloat(amoney);
1716 order_m = order_m.toFixed(2); 1716 order_m = order_m.toFixed(2);
1717 th.setData({ [txt]: amoney, [txt2]: order_m,[txt3]:coupon_price,show_submit:1 }) 1717 th.setData({ [txt]: amoney, [txt2]: order_m,[txt3]:coupon_price,show_submit:1 })
1718 } 1718 }
pages/cart/cart2_pt/cart2_pt.js
@@ -455,7 +455,7 @@ Page({ @@ -455,7 +455,7 @@ Page({
455 if ( parseFloat(th.data.yuer) > total_m) { 455 if ( parseFloat(th.data.yuer) > total_m) {
456 th.setData({ [txt]: total_m, [txt2]:0 }) 456 th.setData({ [txt]: total_m, [txt2]:0 })
457 }else{ 457 }else{
458 - order_m = order_m - parseFloat(th.data.yuer); 458 + order_m = parseFloat(order_m) - parseFloat(th.data.yuer);
459 order_m = order_m.toFixed(2); 459 order_m = order_m.toFixed(2);
460 th.setData({ [txt]: th.data.userinfo.yuer, [txt2]: order_m }) 460 th.setData({ [txt]: th.data.userinfo.yuer, [txt2]: order_m })
461 } 461 }