feature/main20240421
guojia 9 months ago
parent d8b29c7a0d
commit 6bed38fa17
  1. 5
      app/store/controller/Goods.php

@ -35,6 +35,7 @@ class Goods extends Controller
$model = new GoodsModel; $model = new GoodsModel;
$params = $this->request->param(); $params = $this->request->param();
$params['channel'] = 'zy'; $params['channel'] = 'zy';
$params['merchant_id'] = $this->merchantId;
$list= $model->getList($params, (int)$this->request->param('pageSize', 15)); $list= $model->getList($params, (int)$this->request->param('pageSize', 15));
return $this->renderSuccess(compact('list')); return $this->renderSuccess(compact('list'));
} }
@ -97,7 +98,9 @@ class Goods extends Controller
public function add(): Json public function add(): Json
{ {
$model = new GoodsModel; $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->renderSuccess('添加成功');
} }
return $this->renderError($model->getError() ?: '添加失败'); return $this->renderError($model->getError() ?: '添加失败');

Loading…
Cancel
Save