|
@@ -83,10 +83,12 @@ class Userauth extends Api
|
|
|
}
|
|
|
}
|
|
|
|
|
|
-
|
|
|
- $auth_restult = $this->userauth_aliyun_two($idcard, $truename);
|
|
|
- if($auth_restult == false){
|
|
|
- $this->error('身份证信息与姓名不符');
|
|
|
+ if($this->auth->gender == 0){
|
|
|
+
|
|
|
+ $auth_restult = $this->userauth_aliyun_two($idcard, $truename);
|
|
|
+ if($auth_restult == false){
|
|
|
+ $this->error('身份证信息与姓名不符');
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
$data = [
|
|
@@ -98,24 +100,30 @@ class Userauth extends Api
|
|
|
'updatetime' => time(),
|
|
|
];
|
|
|
|
|
|
+ if($this->auth->gender == 1){
|
|
|
+ $data['status'] = 0;
|
|
|
+ }
|
|
|
+
|
|
|
|
|
|
- $update_rs = Db::name('user')->where('id',$this->auth->id)->update(['idcard_status'=>1]);
|
|
|
+ $update_rs = Db::name('user')->where('id',$this->auth->id)->update(['idcard_status'=>$data['status']]);
|
|
|
if(!empty($check)){
|
|
|
$rs = Db::name('user_idconfirm')->where('id',$check['id'])->update($data);
|
|
|
}else{
|
|
|
$rs = Db::name('user_idconfirm')->insertGetId($data);
|
|
|
}
|
|
|
|
|
|
-
|
|
|
-
|
|
|
- $task_rs = \app\common\model\TaskLog::tofinish($this->auth->id,5);
|
|
|
- if($task_rs === false){
|
|
|
- Db::rollback();
|
|
|
- $this->error('完成任务失败');
|
|
|
- }
|
|
|
+ if($this->auth->gender == 0){
|
|
|
+
|
|
|
+
|
|
|
+ $task_rs = \app\common\model\TaskLog::tofinish($this->auth->id,5);
|
|
|
+ if($task_rs === false){
|
|
|
+ Db::rollback();
|
|
|
+ $this->error('完成任务失败');
|
|
|
+ }
|
|
|
|
|
|
-
|
|
|
- $msg_id = \app\common\model\Message::addMessage($this->auth->id,'实名认证','实名认证已经审核通过');
|
|
|
+
|
|
|
+ $msg_id = \app\common\model\Message::addMessage($this->auth->id,'实名认证','实名认证已经审核通过');
|
|
|
+ }
|
|
|
|
|
|
if(!$rs || !$update_rs){
|
|
|
Db::rollback();
|