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