0"; }else{ $where .= " and id < ".$lastIndex; } $types = [1,2,3,4]; if(!empty($GLOBALS['data']['data']["type"])){ $type = $GLOBALS['data']['data']["type"]; if(!in_array($type, $types)){ return show("上传的类型不正确"); } if($type == 1) $where .= " and type = 1"; if($type == 2) $where .= " and type = 2"; if($type == 3) $where .= " and disabled = 1"; } $list = Db::name("student")->where($where)->order('hot desc')->limit(env("page_count"))->where($where)->select()->toArray(); $result = StudentToArray($list); return show(SUCCESS_MESSAGE.'!',SUCCESS_CODE,$result); } }