@@ -41,10 +41,14 @@ class EducationModel extends Model
}
- return Json::create([
+ // 打印 $tree 数组
+ print_r($tree);
+
+ // 返回 JSON 响应对象
+ return \think\Response\Json::create([
'code' => 200,
'msg' => 'success',
- 'data' => array_values($tree),
+ 'data' => $tree,
]);