Merge remote-tracking branch 'origin/dev' into dev

master
liuweiwen 5 years ago
commit d5974f973f

@ -1197,8 +1197,8 @@ function age_verify($cardno, $name)
} else {
return 2;
}
} elseif ($date['status'] > 200) {
return -2;
} elseif (isset($date['status']) && $date['status'] != '01') {
return $date['status'];
} else {
return $date;
}
@ -1210,11 +1210,11 @@ function age($cardno, $name)
$host = "https://idcardcert.market.alicloudapi.com";
$path = "/idCardCert";
$method = "GET";
$appcode = C('tool_age.appcode');
// $appcode = "244181f0846541a19e24df409736d3b9";
// $appcode = C('tool_age.appcode');
$appcode = "244181f0846541a19e24df409736d3b9";
$headers = array();
array_push($headers, "Authorization:APPCODE " . $appcode);
$querys = "idCard=" . $cardno . "&name=" . $name;
$querys ="idCard={$cardno}&name={$name}";
$bodys = "";
$url = $host . $path . "?" . $querys;
$curl = curl_init();
@ -1223,7 +1223,7 @@ function age($cardno, $name)
curl_setopt($curl, CURLOPT_HTTPHEADER, $headers);
curl_setopt($curl, CURLOPT_FAILONERROR, false);
curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
curl_setopt($curl, CURLOPT_HEADER, true);
curl_setopt($curl, CURLOPT_HEADER, false);
if (1 == strpos("$" . $host, "https://")) {
curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, false);
curl_setopt($curl, CURLOPT_SSL_VERIFYHOST, false);
@ -1236,18 +1236,7 @@ function age($cardno, $name)
$r = json_decode($output, true);
if ($r['status'] == "02") return 0;
return $r;
// if (empty($output)) {
// return -1;//用完
// }
// if (curl_getinfo($curl, CURLINFO_HTTP_CODE) == '200') {
// $headersize = curl_getinfo($curl, CURLINFO_HEADER_SIZE);
// $header = substr($output, 0, $headersize);
// $body = substr($output, $headersize);
// curl_close($curl);
// return json_decode($body, true);
// } else {
// return -2;//失败
// }
}
/*短信发送验证限制条件 */

@ -424,7 +424,7 @@ class PromoteCoinController extends BaseController
$targetAccount = isset($promotes[$log['target_id']]) ? $promotes[$log['target_id']]['account'] : '未知推广账号';
}
if ($log['target_type'] == 2) {
$targetAccount = isset($promotes[$log['target_id']]) ? $promotes[$log['target_id']]['account'] : '未知玩家';
$targetAccount = isset($users[$log['target_id']]) ? $users[$log['target_id']]['account'] : '未知玩家';
}
$records[] = [
'id' => $log['id'],

@ -1850,7 +1850,7 @@ class QueryController extends BaseController
$list['server_name'] = empty($list['server_name']) ? '--' : $list['server_name'];
$list['role_name'] = empty($list['role_name']) ? '--' : $list['role_name'];
$list['role_level'] = empty($list['role_level']) ? '--' : $list['role_level'];
$list['unlogin_day'] = empty($list['unlogin_day']) ? '--' : intval((strtotime(date('Y-m-d 00:00:00')) - strtotime(date('Y-m-d 00:00:00', $list['play_time']))) / (24 * 3600));
$list['unlogin_day'] = empty($list['play_time']) ? '--' : intval((strtotime(date('Y-m-d 00:00:00')) - strtotime(date('Y-m-d 00:00:00', $list['play_time']))) / (24 * 3600));
$list['play_time'] = empty($list['play_time']) ? '--' : date('Y-m-d H:i:s', $list['play_time']);
$list['promote_account'] = empty($list['promote_account']) ? '--' : $list['promote_account'];
}

@ -1021,27 +1021,43 @@ class UserController extends BaseController
if ($status == 0) {
$this->ajaxReturn(array('status' => 0, 'info' => '实名认证暂未开启!', 'url' => U('User/userauth')));
} else {
$re = age_verify($_REQUEST['real_name'], $_REQUEST['idcard']);
//PC_REAL_NAME_REGISTER
$ages = M("Config")->where("name = 'PC_REAL_NAME_REGISTER'")->field("status")->find()['status'];
if($ages == 1){
$re =age_verify($_REQUEST['idcard'],$_REQUEST['real_name']);
if ($re == 0) {
$this->ajaxReturn(array('status' => 0, 'info' => '审核失败!', 'url' => U('User/userauth')));
}
if ($re == -1) {
$this->ajaxReturn(array('status' => 0, 'info' => '短信数量已使用完!', 'url' => U('User/userauth')));
}
if ($re == -2) {
$this->ajaxReturn(array('status' => 0, 'info' => '连接错误,请检查配置!', 'url' => U('User/userauth')));
if ($re == "202") {
$this->ajaxReturn(array('status' => 0, 'info' => '无法验证!【中心中无此身份证记录,军人转业,户口迁移等】', 'url' => U('User/userauth')));
}
if ($re == "203") {
$this->ajaxReturn(array('status' => 0, 'info' => '异常情况!', 'url' => U('User/userauth')));
}
if ($re == "204") {
$this->ajaxReturn(array('status' => 0, 'info' => '姓名格式不正确!', 'url' => U('User/userauth')));
}
if ($re == "205") {
$this->ajaxReturn(array('status' => 0, 'info' => '身份证格式不正确!', 'url' => U('User/userauth')));
}
if ($re == 1) {
$resdata = 2;//成年
}
if ($re == 2) {
$resdata = 3;//未成年
}
}else{
$re = 2;
$resdata = 2;
}
// if ($re > 0) {
}
if ($re > 0) {
$model = D('User')->where($map)->save(array('real_name' => $_REQUEST['real_name'], 'idcard' => $_REQUEST['idcard'], 'age_status' => $resdata));
// }
}
if ($model !== false) {

Loading…
Cancel
Save