only([ 'p_id' ], 'post'); // 查询类别 $category = new \app\system\model\Category; $data = $category->srcChild($src) ->visible([ 'id' ,'title' ]); $src['all'] = true; $cnt = $category->srcChild($src)->count(); $data = reset_data($data, $src); return json($data); } }