diff --git a/application/api/model/Tencent.php b/application/api/model/Tencent.php index 63d2e5b..eb634cf 100644 --- a/application/api/model/Tencent.php +++ b/application/api/model/Tencent.php @@ -838,7 +838,13 @@ class Tencent extends Model // 处理响应 if ($httpCode == 200) { - return json_decode($response, true)['result']['faceId']; + $red = json_decode($response, true); + if ($red['code'] == 0) { + return $red['result']['faceId']; + } else { + return ['code' => 0, 'msg' => $red['msg'], 'data' => null]; + } +// return json_decode($response, true)['result']['faceId']; } else { return ['code' => $httpCode, 'msg' => '接口请求失败']; } diff --git a/application/api/model/UserData.php b/application/api/model/UserData.php index f8ff74d..da8a728 100644 --- a/application/api/model/UserData.php +++ b/application/api/model/UserData.php @@ -288,9 +288,9 @@ class UserData extends Model return ['code' => 0, 'msg' => '请先绑定手机号','data' =>null]; } //查询是否已经提交过数据了 - $is_real = db::name('user_auth')->where(['card_id' => $id_card])->find(); + $is_real = db::name('user_auth')->where(['card_id' => $id_card,'is_real' => 1])->find(); if($is_real){ - return ['code' => 0, 'msg' => '请勿重复提交','data' =>null]; + return ['code' => 0, 'msg' => '已经提交审核了,请等待验证结果!','data' =>null]; } $auth = [ 'mobile' => $user_mobile, @@ -326,6 +326,9 @@ class UserData extends Model $sign = model('Tencent')->getSign($user_id,$nonceStr,$sign_ticket,$config['tencent_app_id']); //生成faceId $faceId = model('Tencent')->getFaceId($orderNo,$real_name,$id_card,$sign,$user_id,$config['tencent_app_id'],$nonceStr); + if(isset($faceId['code'])){ + return ['code' => 0, 'msg' => $faceId['msg'],'data' =>null]; + } $data = [ 'userid' => 'u'.$user_id,