where($where) ->order("od asc,recommend desc,gr_id desc") ->paginate($pageSize, false, ['page' => $page]); $result = ['grlist' => $grlist->items(), 'total' => $grlist->total()]; return app('json')->success($result); } /** * 获取轮播列表 * @return mixed */ public function recommend() { $EducationModel = new \app\model\api\Education(); $where = [ 'audit' => 1, 'recommend' => 1, ]; $recommendList = $EducationModel->getEducationGrList($where, 9, "od asc,recommend desc,gr_id desc"); $result = ['recommendList' => $recommendList]; return app('json')->success($result); } }