|
@@ -70,31 +70,11 @@ class Userauth extends Api
|
|
$this->error('该身份证号已被他人使用');
|
|
$this->error('该身份证号已被他人使用');
|
|
}
|
|
}
|
|
|
|
|
|
- //限制每日请求次数
|
|
|
|
- $time = time();
|
|
|
|
- $today_end = strtotime(date('Y-m-d 23:59:59', $time));
|
|
|
|
- $cache_time = $today_end - $time; //缓存时间
|
|
|
|
- $time_count = Cache::get('fourauth' . $this->auth->id);
|
|
|
|
- if (!$time_count) {
|
|
|
|
- Cache::set('fourauth' . $this->auth->id, 1, $cache_time);
|
|
|
|
- } else {
|
|
|
|
- Cache::set('fourauth' . $this->auth->id, $time_count + 1, $cache_time);
|
|
|
|
- if ($time_count > 5) {
|
|
|
|
- $this->error('今日实名次数已到上限,明天再来吧');
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
- //阿里云身份证二要素认证
|
|
|
|
- $auth_restult = $this->userauth_aliyun_two($idcard, $truename);
|
|
|
|
- if($auth_restult == false){
|
|
|
|
- $this->error('身份证信息与姓名不符');
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
$data = [
|
|
$data = [
|
|
'user_id' => $this->auth->id,
|
|
'user_id' => $this->auth->id,
|
|
'truename' => $truename,
|
|
'truename' => $truename,
|
|
'idcard' => $idcard,
|
|
'idcard' => $idcard,
|
|
- 'status' => 1, //不需要人工刚审核了,直接过审
|
|
|
|
|
|
+ 'status' => 0, //人工审核
|
|
'createtime' => time(),
|
|
'createtime' => time(),
|
|
'updatetime' => time(),
|
|
'updatetime' => time(),
|
|
];
|
|
];
|
|
@@ -115,10 +95,7 @@ class Userauth extends Api
|
|
|
|
|
|
Db::commit();
|
|
Db::commit();
|
|
|
|
|
|
-
|
|
|
|
- $this->success('认证通过');
|
|
|
|
$this->success('提交成功,请等待审核');
|
|
$this->success('提交成功,请等待审核');
|
|
-
|
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|