Commit 8c631ad9301e3a330b059ab54d27759918b76ad4

Authored by yvan.ni
1 parent 115b2726

运费计算的bug优化

Showing 1 changed file with 3 additions and 3 deletions
pages/cart/cart2/cart2.js
... ... @@ -1579,8 +1579,8 @@ Page({
1579 1579 //--------循环计算总价-----------
1580 1580 for (var j = 0; j < item.length; j++) {
1581 1581  
1582   - if(item.whsle_id>0){
1583   - whsle_goods_price+=item.goods_price*item.goods_num;
  1582 + if(item[j].whsle_id>0){
  1583 + whsle_goods_price+=item[j].goods_price*item[j].goods_num;
1584 1584 }
1585 1585  
1586 1586 var is_no_zh = 0;
... ... @@ -1703,7 +1703,7 @@ Page({
1703 1703 var user_addr=th.data.user_addr;
1704 1704 var req_d = {
1705 1705 province: user_addr.province, city: user_addr.city, district: user_addr.district,
1706   - wuliu:parseFloat(o_price - quan_price).toFixed(2),store_id: os.stoid
  1706 + wuliu:parseFloat(o_price - quan_price-whsle_goods_price).toFixed(2),store_id: os.stoid
1707 1707 }
1708 1708 await getApp().request.promisePost("/api/weshop/order/areaFreight", {
1709 1709 is_json: 1, data: req_d
... ...