From 2bf78781d1f2009736f1fdb45151afae255ad852 Mon Sep 17 00:00:00 2001 From: liuqing Date: Sun, 10 Mar 2024 22:36:56 +0800 Subject: [PATCH] update --- app/common/model/Category.php | 4 ++++ 1 file changed, 4 insertions(+) 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)