rabin 2 years ago
parent
commit
4f0a9bda77
1 changed files with 7 additions and 1 deletions
  1. 7 1
      app/shop/lib/Sell.php

+ 7 - 1
app/shop/lib/Sell.php

@@ -325,6 +325,8 @@ class Sell
                     }
                 }
             }
+
+            $info['discount_goods'] = array();
             foreach ($info['goods'] as $k => $v) {
                 $info['goods'][$k]['info'] = Dever::load('goods/lib/info')->getPayInfo($v['goods_id'], $v['sku_id']);
                 $info['goods'][$k]['status_name'] = $goods_status[$v['status']];
@@ -346,6 +348,10 @@ class Sell
                         }
                     }
                 }
+
+                if ($v['discount_id'] && $v['discount_id'] > 0) {
+                    $info['discount_goods'] = $info['goods'];
+                }
             }
 
             if ($info['invoice_id']) {
@@ -589,7 +595,7 @@ class Sell
         # 计算礼品卡
         $card = Dever::input('card');
         $wallet = Dever::input('wallet');
-        if ($data['price'] > 0 && isset($data['uid']) && $data['uid'] > 0) {
+        if ($data['price'] > 0 && isset($data['uid']) && $data['uid'] > 0 && $data['discount_id'] <= 0) {
 
             if ($card) {
                 # 验证这个礼品卡属于自己