diff --git a/app/api/model/Goods.php b/app/api/model/Goods.php index efb9fb73..bafca674 100644 --- a/app/api/model/Goods.php +++ b/app/api/model/Goods.php @@ -744,10 +744,11 @@ class Goods extends GoodsModel //价格判断 if (UserService::isstore()) { $priceArr = \app\common\model\PriceSet::distributionPrice($goods['goods_price_min'], $goods['cost_price_min'], $catIds); + $goods_price_min = $goods['goods_price_min']; $goods['goods_price_min_plus'] = $priceArr['membershipPrice']; $goods['goods_price_min_dealer'] = $priceArr['distributionPrice']; $goods['goods_price_min'] = $goods['goods_price_min_plus'];//$goods['cost_price_min'];//店长售价,展示为成本价 - $goods['discount'] = bcdiv((string)($priceArr['distributionPrice'] * 10), (string)$goods['goods_price_min'], 1); + $goods['discount'] = bcdiv((string)($priceArr['membershipPrice'] * 10), (string)$goods_price_min, 1); } elseif (UserService::isPlusMember()) { $membershipPrice = \app\common\model\PriceSet::membershipPrice($goods['goods_price_min'], $goods['cost_price_min'], $catIds); $goods['discount'] = bcdiv((string)($membershipPrice * 10), (string)$goods['goods_price_min'], 1);