| 1234567891011121314151617181920212223242526272829303132333435363738 |
- <?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;
- }
- 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);
- }
- }
|