Browse Source

超级会员 散客

shish 3 years ago
parent
commit
68523aed82
1 changed files with 8 additions and 1 deletions
  1. 8 1
      biz-ghs/product/classes/ProductClass.php

+ 8 - 1
biz-ghs/product/classes/ProductClass.php

@@ -622,7 +622,14 @@ class ProductClass extends BaseClass
         $discountPrice = $product['discountPrice'] ?? 0;
         $discountPrice = $product['discountPrice'] ?? 0;
         if ($discountPrice > 0) {
         if ($discountPrice > 0) {
             if ($level == 0) {
             if ($level == 0) {
-                $price = $discountPrice;
+                $skMore = $product['skMore'] ?? 0;
+                $addPrice = $product['addPrice'] ?? 0;
+                $diff = bcsub($skMore,$addPrice, 2);
+                if ($diff > 0) {
+                    $price = bcsub($discountPrice, $diff, 2);
+                } else {
+                    $price = $discountPrice;
+                }
             }
             }
             if ($level == 1) {
             if ($level == 1) {
                 $price = $discountPrice;
                 $price = $discountPrice;