From 0fc990266bdb6ed3643fb91e7794e873b8b6c174 Mon Sep 17 00:00:00 2001 From: zengyyh Date: Tue, 12 Nov 2024 00:10:54 +0800 Subject: [PATCH] 1 --- app/api/controller/Goods.php | 3 ++- app/store/controller/Goods.php | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) 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']); }