Commit c8056f5a29b6310be1c7fa672ed2c055073a7245

Authored by yvan.ni
1 parent d21945c5

购物车购买的时候,优惠促销赠品运费计算的bug优化

packageE/pages/cart/cart2/cart2.js
... ... @@ -1960,11 +1960,11 @@ Page({
1960 1960  
1961 1961 //--------循环计算商品是不是包邮,是不是使用优惠券,此时循环是商品从表-----------
1962 1962 for (var j = 0; j < ord_goods.length; j++) {
1963   - if (ord_goods[j].is_gift) continue;
1964 1963 if (ord_goods[j].whsle_id) continue;
1965 1964 if (ord_goods[j].prom_type == 3 && ord_goods[j].prom_id == item_map.prom_id) {
1966 1965 ord_goods[j].is_xz_yh = ord_goods[j].is_xz_yh ? ord_goods[j].is_xz_yh : item_map.is_xz_yh;
1967 1966 ord_goods[j].is_past = item_map.is_past;
  1967 + if (ord_goods[j].is_gift) continue; //赠品不平摊
1968 1968 ord_goods[j].account_fir = th.item_map_get_goods(ord_goods[j].goods_id, item_map).account_fir;
1969 1969 ord_goods[j].account_yu_fir = th.item_map_get_goods(ord_goods[j].goods_id, item_map).account_yu_fir;
1970 1970 ord_goods[j].account = th.item_map_get_goods(ord_goods[j].goods_id, item_map).account;
... ... @@ -6563,6 +6563,14 @@ Page({
6563 6563 is_post_temp:1 //赠品暂时的是要包邮运算, 后面和主商品是不是包邮一样
6564 6564 };
6565 6565  
  6566 + var prom_goods_map=th.data.prom_goods_map[gf_pickup_id];
  6567 + var fd=prom_goods_map[th.data.gf_prom_id];
  6568 +
  6569 + if(fd){
  6570 + newd.is_past=fd.is_past;
  6571 + newd.is_xz_yh=fd.is_xz_yh;
  6572 + }
  6573 +
6566 6574 //-- 如果是代发商品的时候 --
6567 6575 if (gf_item.goodsinfo.whsle_id) {
6568 6576 newd.whsle_id = gf_item.goodsinfo.whsle_id;
... ...