diff --git a/app/store/controller/Goods.php b/app/store/controller/Goods.php index b6e57d4b..f0faeba5 100644 --- a/app/store/controller/Goods.php +++ b/app/store/controller/Goods.php @@ -35,6 +35,7 @@ class Goods extends Controller $model = new GoodsModel; $params = $this->request->param(); $params['channel'] = 'zy'; + $params['merchant_id'] = $this->merchantId; $list= $model->getList($params, (int)$this->request->param('pageSize', 15)); return $this->renderSuccess(compact('list')); } @@ -97,7 +98,9 @@ class Goods extends Controller public function add(): Json { $model = new GoodsModel; - if ($model->add($this->postForm())) { + $postform = $this->postForm(); + $postform['merchant_id'] = $this->merchantId; + if ($model->add($postform)) { return $this->renderSuccess('添加成功'); } return $this->renderError($model->getError() ?: '添加失败');