diff --git a/app/api/controller/Realname.php b/app/api/controller/Realname.php index 6b05136..98a9477 100644 --- a/app/api/controller/Realname.php +++ b/app/api/controller/Realname.php @@ -27,11 +27,11 @@ class Realname extends Controller $user_data['Name'] = $temp['name']; $user_data['id_code'] = $temp['id_code']; $user_data['is_verify'] = 1; - } - if($user->updateOne(['Id'=>$this->userinfo['UserId']],$user_data)){ - $data = [ - 'Code'=>10000 - ]; + if($user->updateOne(['Id'=>$this->userinfo['UserId']],$user_data)){ + $data = [ + 'Code'=>10000 + ]; + } } else { $data = [ 'Code'=>-10000 diff --git a/fastphp/func/common.php b/fastphp/func/common.php index 8d1a224..9449bcc 100644 --- a/fastphp/func/common.php +++ b/fastphp/func/common.php @@ -134,7 +134,7 @@ function realname($data){ // print_r($result); return true; }else{ - echo $result['error_code'].":".$result['reason'];die; + return false; } }else{ echo "请求失败";die;