|
|
@ -744,10 +744,11 @@ class Goods extends GoodsModel |
|
|
|
//价格判断 |
|
|
|
//价格判断 |
|
|
|
if (UserService::isstore()) { |
|
|
|
if (UserService::isstore()) { |
|
|
|
$priceArr = \app\common\model\PriceSet::distributionPrice($goods['goods_price_min'], $goods['cost_price_min'], $catIds); |
|
|
|
$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_plus'] = $priceArr['membershipPrice']; |
|
|
|
$goods['goods_price_min_dealer'] = $priceArr['distributionPrice']; |
|
|
|
$goods['goods_price_min_dealer'] = $priceArr['distributionPrice']; |
|
|
|
$goods['goods_price_min'] = $goods['goods_price_min_plus'];//$goods['cost_price_min'];//店长售价,展示为成本价 |
|
|
|
$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()) { |
|
|
|
} elseif (UserService::isPlusMember()) { |
|
|
|
$membershipPrice = \app\common\model\PriceSet::membershipPrice($goods['goods_price_min'], $goods['cost_price_min'], $catIds); |
|
|
|
$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); |
|
|
|
$goods['discount'] = bcdiv((string)($membershipPrice * 10), (string)$goods['goods_price_min'], 1); |
|
|
|