diff --git a/packageE/pages/cart/cart2/cart2.js b/packageE/pages/cart/cart2/cart2.js index 802ce31..13c09a2 100644 --- a/packageE/pages/cart/cart2/cart2.js +++ b/packageE/pages/cart/cart2/cart2.js @@ -3612,6 +3612,9 @@ Page({ } } + + var goods_weight_out1=-1; + //--------循环计算总价----------- for (var j = 0; j < item.length; j++) { @@ -3630,17 +3633,16 @@ Page({ if (back_data && back_data['is_by_all'] && item[j].is_post_temp && (!back_data.no_free_goods || !th.ck_no_goods_arr(back_data.no_free_goods, item[j].goods_id))) { - - if( back_data.weight_free* 1000 0 ) { - if (goods_weight < 0) goods_weight = 0; + if (goods_weight_out1 < 0) goods_weight_out1 = 0; cut_good_weight += item[j]['weight'] * item[j]['goods_num']; - goods_weight += item[j]['weight'] * item[j]['goods_num']; + goods_weight_out1 += item[j]['weight'] * item[j]['goods_num']; } if (back_data.weight_free > 0) { out_of_weight = (back_data.weight_free * 1000) - cut_good_weight; } - } + //} continue; } @@ -3675,6 +3677,12 @@ Page({ if (out_of_weight >= 0) out_of_weight = -cut_good_weight; else out_of_weight = -back_data.weight_free * 1000; + if(out_of_weight<0){ + if (goods_weight < 0) goods_weight = 0; + goods_weight+=goods_weight_out1; + } + + var code = ""; if (!th.data.wu_arr) {