|
@@ -3,8 +3,9 @@
|
|
|
namespace app\model\api;
|
|
namespace app\model\api;
|
|
|
|
|
|
|
|
use think\Model;
|
|
use think\Model;
|
|
|
|
|
+use think\response\Json;
|
|
|
|
|
|
|
|
- /**
|
|
|
|
|
|
|
+/**
|
|
|
* 教育模型
|
|
* 教育模型
|
|
|
*/
|
|
*/
|
|
|
class EducationModel extends Model
|
|
class EducationModel extends Model
|
|
@@ -21,7 +22,7 @@ class EducationModel extends Model
|
|
|
/**
|
|
/**
|
|
|
* 获取所有分类
|
|
* 获取所有分类
|
|
|
*
|
|
*
|
|
|
- * @return \think\response\Json
|
|
|
|
|
|
|
+ * @return \think\Response|Json
|
|
|
*/
|
|
*/
|
|
|
public function getCate()
|
|
public function getCate()
|
|
|
{
|
|
{
|
|
@@ -40,7 +41,11 @@ class EducationModel extends Model
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- return $this->success(array_values($tree));
|
|
|
|
|
|
|
+ return Json::create([
|
|
|
|
|
+ 'code' => 200,
|
|
|
|
|
+ 'msg' => 'success',
|
|
|
|
|
+ 'data' => array_values($tree),
|
|
|
|
|
+ ]);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
// public function getGrList($userId)
|
|
// public function getGrList($userId)
|