|
|
@@ -51,15 +51,13 @@ class Index extends AuthController
|
|
|
]);
|
|
|
}
|
|
|
|
|
|
- //获取所有分类列表
|
|
|
+ /**
|
|
|
+ * 获取所有分类列表
|
|
|
+ */
|
|
|
public function getCateList()
|
|
|
{
|
|
|
- try {
|
|
|
- $cateList = (new \app\model\api\EducationModel)->select();
|
|
|
- } catch (DataNotFoundException $e) {
|
|
|
- } catch (ModelNotFoundException $e) {
|
|
|
- } catch (DbException $e) {
|
|
|
- }
|
|
|
+ $educationModel = new EducationModel();
|
|
|
+ $cateList = $educationModel->getCate();
|
|
|
return json($cateList);
|
|
|
}
|
|
|
}
|