diff --git a/app/api/controller/Category.php b/app/api/controller/Category.php index e05111ad..bb17a958 100644 --- a/app/api/controller/Category.php +++ b/app/api/controller/Category.php @@ -50,8 +50,13 @@ class Category extends Controller $merchantId = (int)$this->request->param('merchantId', 0); $model = new CategoryModel; $hasGoods = GoodsCategoryRel::getcategory($this->storeId,$merchantId); - print_r($hasGoods);die; $arr = []; + if (!empty($hasGoods)) { + foreach ($hasGoods['data'] as $v) { + $arr[] = $v['category_id']; + } + } + if (!empty($arr)) { $arr = ['cataIds' => $hasGoods]; }