|
|
|
@ -544,20 +544,21 @@ class Goods extends GoodsModel |
|
|
|
|
// $price_list_plus[] = GoodsPriceModel::getDiscountPrice($v, 1, $goods['goods_price_min']); |
|
|
|
|
// $price_list_dealer[] = GoodsPriceModel::getDiscountPrice($v, 2, $goods['goods_price_min']); |
|
|
|
|
// } |
|
|
|
|
$goods['line_price_min'] = $goods['goods_price_min'];//划线价格等于市场价 |
|
|
|
|
//价格判断 |
|
|
|
|
if (UserService::isstore()) { |
|
|
|
|
$priceArr = \app\common\model\PriceSet::distributionPrice($goods['goods_price_min'], $goods['cost_price_min'], $catIds); |
|
|
|
|
$goods['goods_price_min_plus'] = $priceArr['membershipPrice']; |
|
|
|
|
$goods['goods_price_min_dealer'] = $priceArr['distributionPrice']; |
|
|
|
|
|
|
|
|
|
$goods['goods_price_min'] = $goods['cost_price_min'];//店长售价,展示为成本价 |
|
|
|
|
// $goods['goods_price_min_plus'] = min($price_list_plus); |
|
|
|
|
// $goods['goods_price_min_dealer'] = min($price_list_dealer); |
|
|
|
|
} elseif (UserService::isPlusMember()) { |
|
|
|
|
$goods['goods_price_min_plus'] = \app\common\model\PriceSet::membershipPrice($goods['goods_price_min'], $goods['cost_price_min'], $catIds); |
|
|
|
|
$goods['goods_price_min'] = \app\common\model\PriceSet::membershipPrice($goods['goods_price_min'], $goods['cost_price_min'], $catIds); |
|
|
|
|
//$goods['goods_price_min_plus'] = min($price_list_plus); |
|
|
|
|
} elseif (UserService::isDealerMember()) { |
|
|
|
|
$priceArr = \app\common\model\PriceSet::distributionPrice($goods['goods_price_min'], $goods['cost_price_min'], $catIds); |
|
|
|
|
$goods['goods_price_min_dealer'] = $priceArr['distributionPrice']; |
|
|
|
|
$goods['goods_price_min'] = $priceArr['distributionPrice']; |
|
|
|
|
//$goods['goods_price_min_dealer'] = min($price_list_dealer); |
|
|
|
|
} |
|
|
|
|
// 会员折扣价: 商品sku列表 |
|
|
|
@ -573,17 +574,18 @@ class Goods extends GoodsModel |
|
|
|
|
$priceArr = \app\common\model\PriceSet::distributionPrice($skuItem['goods_price'], $skuItem['cost_price'], $catIds); |
|
|
|
|
$skuItem['goods_price_min_plus'] = $priceArr['membershipPrice']; |
|
|
|
|
$skuItem['goods_price_min_dealer'] = $priceArr['distributionPrice']; |
|
|
|
|
|
|
|
|
|
$skuItem['goods_price_min'] = $skuItem['cost_price_min'];//店长售价,展示为成本价 |
|
|
|
|
// $skuItem['goods_price_plus'] = min($temp_price_plus); |
|
|
|
|
// $skuItem['goods_price_dealer'] = min($temp_price_dealer); |
|
|
|
|
} elseif (UserService::isPlusMember()) { |
|
|
|
|
$skuItem['goods_price_plus'] = \app\common\model\PriceSet::membershipPrice($skuItem['goods_price'], $skuItem['cost_price'], $catIds); |
|
|
|
|
//$skuItem['goods_price_plus'] = \app\common\model\PriceSet::membershipPrice($skuItem['goods_price'], $skuItem['cost_price'], $catIds); |
|
|
|
|
$skuItem['goods_price_min'] = \app\common\model\PriceSet::membershipPrice($skuItem['goods_price'], $skuItem['cost_price'], $catIds); |
|
|
|
|
|
|
|
|
|
//$skuItem['goods_price_plus'] = min($temp_price_plus); |
|
|
|
|
} elseif (UserService::isDealerMember()) { |
|
|
|
|
$priceArr = \app\common\model\PriceSet::distributionPrice($skuItem['goods_price'], $skuItem['cost_price'], $catIds); |
|
|
|
|
$skuItem['goods_price_min_dealer'] = $priceArr['distributionPrice']; |
|
|
|
|
|
|
|
|
|
//$skuItem['goods_price_min_dealer'] = $priceArr['distributionPrice']; |
|
|
|
|
$skuItem['goods_price_min'] = $priceArr['distributionPrice']; |
|
|
|
|
//$skuItem['goods_price_dealer'] = min($temp_price_dealer); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
@ -598,6 +600,7 @@ class Goods extends GoodsModel |
|
|
|
|
// } |
|
|
|
|
// $goods['skuInfo']['goods_price'] = min($sku_price_plus); |
|
|
|
|
$goods['skuInfo']['goods_price'] = \app\common\model\PriceSet::membershipPrice($goods['skuInfo']['goods_price'], $goods['skuInfo']['cost_price'], $catIds); |
|
|
|
|
|
|
|
|
|
} elseif (UserService::isDealerMember()) { |
|
|
|
|
// $sku_price_dealer = []; |
|
|
|
|
// foreach ($catIds as $k => $v) { |
|
|
|
|