diff --git a/app/api/controller/Maintainentry.php b/app/api/controller/Maintainentry.php index 7625b11..94f2a74 100644 --- a/app/api/controller/Maintainentry.php +++ b/app/api/controller/Maintainentry.php @@ -1452,8 +1452,10 @@ class Maintainentry extends BaseController if (empty($type)) { $this->apiError('缺少参数'); } else { - $where['type'] = $type; - $where['status'] = 'normal'; + + $where[] = ['pid','<>',0]; + $where[] = ['type','=',$type]; + $where[] = ['status','=','normal']; $result = Db::table('fa_category')->where($where)->field('id,name,weigh')->order('weigh desc')->select(); if ($result) { $this->apiSuccess('获取成功', $result, 1);