diff --git a/app/api/controller/Goods.php b/app/api/controller/Goods.php index a2bc72ae..53bb02ac 100644 --- a/app/api/controller/Goods.php +++ b/app/api/controller/Goods.php @@ -576,6 +576,7 @@ class Goods extends Controller { $id = $this->request->param('id'); $detail = ModelTipoff::where('id', $id)->find(); + $storeId = $this->storeId; $goodsList = GoodsModel::whereIn("goods_id", $detail['goods_id'])->field('goods_id,store_id,goods_name,goods_price_min,cost_price_min,goods_no,link')->select(); $goods_no = []; @@ -614,7 +615,7 @@ class Goods extends Controller //分类 if ($cates) { //会员价 - $value['membership_price'] = \app\common\model\PriceSet::membershipPrice($value['goods_price_min'], $value['cost_price_min'], array_column($cates, 'category_id'),$value['store_id']); + $value['membership_price'] = \app\common\model\PriceSet::membershipPrice($value['goods_price_min'], $value['cost_price_min'], array_column($cates, 'category_id'), $storeId ); } } diff --git a/app/store/controller/Goods.php b/app/store/controller/Goods.php index f12c2404..b00ba566 100644 --- a/app/store/controller/Goods.php +++ b/app/store/controller/Goods.php @@ -765,6 +765,7 @@ class Goods extends Controller { $id = $this->request->param('id'); $detail = ModelTipoff::where('id', $id)->find(); + $storeId = $this->storeId; $goodsList = GoodsModel::whereIn("goods_id", $detail['goods_id'])->field('goods_id,store_id,goods_name,goods_price_min,cost_price_min,goods_no,link')->select(); $goods_no = []; @@ -804,7 +805,7 @@ class Goods extends Controller //分类 if ($cates) { //会员价 - $value['membership_price'] = \app\common\model\PriceSet::membershipPrice($value['goods_price_min'], $value['cost_price_min'], array_column($cates, 'category_id'),$value['store_id']); + $value['membership_price'] = \app\common\model\PriceSet::membershipPrice($value['goods_price_min'], $value['cost_price_min'], array_column($cates, 'category_id'),$storeId); } unset($goodsList[$key]['cost_price_min']); }