zengyyh 3 months ago
parent 2ae77cf88f
commit 621cf2e5f9
  1. 15
      app/store/controller/Goods.php

@ -396,5 +396,20 @@ class Goods extends Controller
return $this->renderSuccess('操作成功');
}
/**
* 修改商品状态(上下架)
* @param array $goodsIds 商品id集
* @param bool $state 为true表示上架
* @return Json
*/
public function jingpin(array $goodsIds, int $is_jingpin): Json
{
$model = new GoodsModel;
if (!$model->setIsJingpin($goodsIds, $is_jingpin)) {
return $this->renderError($model->getError() ?: '操作失败');
}
return $this->renderSuccess('操作成功');
}
}

Loading…
Cancel
Save