diff --git a/app/common/model/Category.php b/app/common/model/Category.php index 57d78391..4847e2c7 100644 --- a/app/common/model/Category.php +++ b/app/common/model/Category.php @@ -107,6 +107,10 @@ class Category extends BaseModel } isset($params['store_id']) && $params['store_id'] > -1 && $filter[] = ['store_id', '=', (int)$params['store_id']]; + if (isset($param['category_id']) && $param['category_id'] != "") { + $filter[] = ['parent_id', '=', $params['category_id']]; + } + // 查询列表数据 return $this->with(['image']) ->where($filter)