lqmac 2 months ago
commit ec96220764
  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