显示编辑商品错误的信息
This commit is contained in:
parent
86d1b9c94b
commit
b3d4462e4d
@ -29,14 +29,14 @@ class LocalStoreGoods extends Api
|
||||
// 商家添加商品
|
||||
public function saveGoods()
|
||||
{
|
||||
$form = $this->request->post();
|
||||
(new LocalStoreGoodsValidate())->goCheck();
|
||||
$result = LocalStoreGoodsLogic::saveGoods($form, $this->user_id);
|
||||
if ($result === false) {
|
||||
$error = LocalStoreGoodsLogic::getError() ?: '提交失败';
|
||||
return JsonServer::error($error);
|
||||
try {
|
||||
$form = $this->request->post();
|
||||
(new LocalStoreGoodsValidate())->goCheck();
|
||||
LocalStoreGoodsLogic::saveGoods($form, $this->user_id);
|
||||
return JsonServer::success('提交成功', [], 1, 1);
|
||||
} catch (\Exception $e) {
|
||||
return JsonServer::error($e->getMessage());
|
||||
}
|
||||
return JsonServer::success('提交成功', [], 1, 1);
|
||||
}
|
||||
|
||||
public function editPrice()
|
||||
|
||||
Loading…
Reference in New Issue
Block a user