ZxcZxc123 2 년 전
부모
커밋
ce27a37e4f
1개의 변경된 파일5개의 추가작업 그리고 7개의 파일을 삭제
  1. 5 7
      app/system/controller/Index.php

+ 5 - 7
app/system/controller/Index.php

@@ -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);
     }
 }