From d809be4dbde0b0a7b54a68477434f86b05fe2c15 Mon Sep 17 00:00:00 2001 From: wangxiaowei Date: Sat, 21 Sep 2024 10:39:17 +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/controller/BusinessSchool.php | 41 +++++++++++++++++++++++++++ app/api/logic/BusinessSchoolLogic.php | 25 ++++++++++++++++ 2 files changed, 66 insertions(+) create mode 100755 app/api/controller/BusinessSchool.php create mode 100644 app/api/logic/BusinessSchoolLogic.php diff --git a/app/api/controller/BusinessSchool.php b/app/api/controller/BusinessSchool.php new file mode 100755 index 00000000..d5fdb75c --- /dev/null +++ b/app/api/controller/BusinessSchool.php @@ -0,0 +1,41 @@ +request->get(); + $get['page_no'] = $this->page_no; + $get['page_size'] = $this->page_size; + $lists = ArticleLogic::lists($get); + return JsonServer::success('获取成功', $lists); + } + + /** + * @Notes: 文章详细 + * @Author: 张无忌 + */ + public function detail() + { + $id = $this->request->get('id'); + $detail = ArticleLogic::detail($id); + return JsonServer::success('获取成功', $detail); + } +} \ No newline at end of file diff --git a/app/api/logic/BusinessSchoolLogic.php b/app/api/logic/BusinessSchoolLogic.php new file mode 100644 index 00000000..b5f6293a --- /dev/null +++ b/app/api/logic/BusinessSchoolLogic.php @@ -0,0 +1,25 @@ +field(['id', 'name']) + ->where([ + ['del', '=', 0], + ['is_show', '=', 1] + ])->order('order asc')->select()->toArray(); + + } catch (\Exception $e) { + return ['error'=>$e->getMessage()]; + } + } +} \ No newline at end of file