mainId); util::success($return); } //取分类下商品 ssh 2019.12.2 public function actionGoodsList() { $categoryId = Yii::$app->request->get('categoryId'); if (empty($categoryId)) { util::fail('没有找到分类'); } $where = []; $where['mainId'] = $this->mainId; $where['cId'] = $categoryId; $where['delStatus'] = 0; $where['status'] = 1; $shop = $this->shop; $stockModel = $shop->stockModel ?? 0; if ($stockModel == 1) { //管到支的,查看所有上架并且花材数量设置好的商品 $where['setItemNum'] = 1; } $data = GoodsCategoryService::getGoodsList($where); util::success($data); } }