Authored by Rock Zhang

添加结算页中加价购或者赠品的标识

Code Review By Rock Zhang
@@ -630,17 +630,10 @@ class Helpers @@ -630,17 +630,10 @@ class Helpers
630 $oneGoods['id'] = $single['product_skn']; 630 $oneGoods['id'] = $single['product_skn'];
631 $oneGoods['name'] = $single['product_name']; 631 $oneGoods['name'] = $single['product_name'];
632 $oneGoods['thumb'] = !empty($single['goods_images']) ? Images::getImageUrl($single['goods_images'], 120, 160) : ''; 632 $oneGoods['thumb'] = !empty($single['goods_images']) ? Images::getImageUrl($single['goods_images'], 120, 160) : '';
633 - $oneGoods['price'] = self::transPrice($single['last_price']); 633 + $oneGoods['price'] = self::transPrice($single['sales_price']);
634 $oneGoods['marketPrice'] = self::transPrice($single['market_price']); 634 $oneGoods['marketPrice'] = self::transPrice($single['market_price']);
635 $oneGoods['count'] = $single['storage_number']; 635 $oneGoods['count'] = $single['storage_number'];
636 636
637 - //gift=>是否赠品,advanceBuy=>是否加价购,soldOut=>失效商品;  
638 - if ($single['goods_type'] == 'gift' && !isset($single['isAdvanceBuy'])) {  
639 - $oneGoods['isGift'] = true;  
640 - } elseif ($single['goods_type'] == 'price_gift') {  
641 - $oneGoods['isAdvanceBuy'] = true;  
642 - }  
643 -  
644 $gift['goods'][] = $oneGoods; 637 $gift['goods'][] = $oneGoods;
645 } 638 }
646 639
@@ -424,6 +424,13 @@ class CartModel @@ -424,6 +424,13 @@ class CartModel
424 $oneGoods['price'] = Helpers::transPrice($single['sales_price']); 424 $oneGoods['price'] = Helpers::transPrice($single['sales_price']);
425 $oneGoods['count'] = $single['buy_number']; 425 $oneGoods['count'] = $single['buy_number'];
426 426
  427 + //gift=>是否赠品,advanceBuy=>是否加价购;
  428 + if ($single['goods_type'] == 'gift' && !isset($single['isAdvanceBuy'])) {
  429 + $oneGoods['isGift'] = true;
  430 + } elseif ($single['goods_type'] == 'price_gift') {
  431 + $oneGoods['isAdvanceBuy'] = true;
  432 + }
  433 +
427 $result['goods'][] = $oneGoods; 434 $result['goods'][] = $oneGoods;
428 } 435 }
429 } 436 }