From a51de4c967c7039ef3e609edbe43aaea62aead2f Mon Sep 17 00:00:00 2001 From: wangxiaowei Date: Sat, 21 Sep 2024 10:54:10 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E5=95=86=E5=AD=A6=E9=99=A2?= =?UTF-8?q?=E5=88=86=E7=B1=BB=E8=8E=B7=E5=8F=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/api/logic/BusinessSchoolLogic.php | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/app/api/logic/BusinessSchoolLogic.php b/app/api/logic/BusinessSchoolLogic.php index b5f6293a..d3dbe2df 100644 --- a/app/api/logic/BusinessSchoolLogic.php +++ b/app/api/logic/BusinessSchoolLogic.php @@ -11,13 +11,11 @@ class BusinessSchoolLogic extends Logic public static function category() { try { - $model = new BusinessSchoolCategory(); - return $model->field(['id', 'name']) + return BusinessSchoolCategory::field(['id', 'name']) ->where([ ['del', '=', 0], ['is_show', '=', 1] - ])->order('order asc')->select()->toArray(); - + ])->order('sort asc')->select()->toArray(); } catch (\Exception $e) { return ['error'=>$e->getMessage()]; }