| 12345678910111213141516171819202122232425262728293031323334353637383940 |
- <?php
- namespace app\api\controller;
- use Alipay\EasySDK\Kernel\Base;
- use think\facade\Db;
- class Education
- {
- /**
- * 课程列表页面
- * @return \think\response\Json
- */
- public function index()
- {
- $EducationModel = new \app\model\api\Education();
- $where["audit"] = 1;
- $type1 = input("type1", "");
- if ($type1 !== "") {
- $where["type1"] = $type1;
- } else {
- $type1 = 2;
- }
- if ($type1 == 0) {
- $where["type1"] = 0;
- } elseif ($type1 == 1) {
- $where["type1"] = 1;
- }
- $grlist = $EducationModel->getEducationGrList($where, 20, "od asc,recommend desc,gr_id desc");
- $result = ['grlist' => $grlist,];
- return app('json')->success($result);
- }
- }
|