Education.php 764 B

1234567891011121314151617181920212223242526272829303132333435363738
  1. <?php
  2. namespace app\api\controller;
  3. use Alipay\EasySDK\Kernel\Base;
  4. use think\facade\Db;
  5. class Education
  6. {
  7. /**
  8. * 课程列表页面
  9. * @return \think\response\Json
  10. */
  11. public function index()
  12. {
  13. $EducationModel = new \app\model\api\Education();
  14. $where["audit"] = 1;
  15. $type1 = input("type1", "");
  16. if ($type1 !== "") {
  17. $where["type1"] = $type1;
  18. }
  19. if ($type1 == 0) {
  20. $where["type1"] = 0;
  21. } elseif ($type1 == 1) {
  22. $where["type1"] = 1;
  23. }
  24. $grlist = $EducationModel->getEducationGrList($where, 20, "od asc,recommend desc,gr_id desc");
  25. $result = ['grlist' => $grlist,];
  26. return app('json')->success($result);
  27. }
  28. }