table} where is_delete=0"; $count = $RemindModel->query($sql); $sql = "select * from {$RemindModel->table} where is_delete=0 order by id desc limit {$offset},{$limit} "; $data = $RemindModel->query($sql); foreach($data as $key => &$val){ $val['sex'] = $val['sex']==1?'公':'母'; } $return['code'] = 0; $return['count'] = count($count); $return['data'] = $data; $return['msg'] = "成功"; echo json_encode($return);die; } }