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