From d8722b25b9f35db7f22e96932b3ae454a1cfb355 Mon Sep 17 00:00:00 2001 From: ELF <360197197@qq.com> Date: Mon, 2 Dec 2019 18:11:41 +0800 Subject: [PATCH 1/6] =?UTF-8?q?=E4=BF=AE=E6=94=B9bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Application/Home/Controller/PromoteCoinController.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Application/Home/Controller/PromoteCoinController.class.php b/Application/Home/Controller/PromoteCoinController.class.php index 9a6ba8d00..a9dcc566c 100644 --- a/Application/Home/Controller/PromoteCoinController.class.php +++ b/Application/Home/Controller/PromoteCoinController.class.php @@ -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'], From 13be4561461f3b5d2daf6a14901e81a6f568737a Mon Sep 17 00:00:00 2001 From: chenxiaojun <956334972@qq.com> Date: Mon, 2 Dec 2019 18:15:36 +0800 Subject: [PATCH 2/6] =?UTF-8?q?=E6=8E=A8=E5=B9=BF=E5=B9=B3=E5=8F=B0->?= =?UTF-8?q?=E6=95=B0=E6=8D=AE=E7=AE=A1=E7=90=86->=E5=85=85=E5=80=BC?= =?UTF-8?q?=E7=8E=A9=E5=AE=B6--=E6=9B=B4=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Application/Home/Controller/QueryController.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Application/Home/Controller/QueryController.class.php b/Application/Home/Controller/QueryController.class.php index 7df6a7e21..c3921b8fe 100644 --- a/Application/Home/Controller/QueryController.class.php +++ b/Application/Home/Controller/QueryController.class.php @@ -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']; } From 6368693b48a288cfeec5a512c3c7cb94308de9ae Mon Sep 17 00:00:00 2001 From: chenzhi Date: Mon, 2 Dec 2019 18:23:04 +0800 Subject: [PATCH 3/6] =?UTF-8?q?=E5=AE=9E=E5=90=8D6.0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Application/Common/Common/function.php | 23 +++++-------------- .../Controller/UserController.class.php | 6 ++--- 2 files changed, 9 insertions(+), 20 deletions(-) diff --git a/Application/Common/Common/function.php b/Application/Common/Common/function.php index 20b2b63ac..61fab3954 100644 --- a/Application/Common/Common/function.php +++ b/Application/Common/Common/function.php @@ -1197,7 +1197,7 @@ function age_verify($cardno, $name) } else { return 2; } - } elseif ($date['status'] > 200) { + } elseif (isset($date['status']) && $date['status'] != '01') { return -2; } 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;//失败 - // } + } /*短信发送验证限制条件 */ diff --git a/Application/Mobile/Controller/UserController.class.php b/Application/Mobile/Controller/UserController.class.php index b1bc61ffb..138b72c15 100644 --- a/Application/Mobile/Controller/UserController.class.php +++ b/Application/Mobile/Controller/UserController.class.php @@ -1039,9 +1039,9 @@ class UserController extends BaseController $resdata = 3;//未成年 } } - // if ($re > 0) { - $model = D('User')->where($map)->save(array('real_name' => $_REQUEST['real_name'], 'idcard' => $_REQUEST['idcard'], 'age_status' => $resdata)); - // } + if ($re > 0) { + $model = D('User')->where($map)->save(array('real_name' => $_REQUEST['real_name'], 'idcard' => $_REQUEST['idcard'], 'age_status' => $resdata)); + } if ($model !== false) { From 94a7c4104cfdb0b5f13068af42c9ca23e437bb45 Mon Sep 17 00:00:00 2001 From: chenzhi Date: Mon, 2 Dec 2019 18:29:09 +0800 Subject: [PATCH 4/6] =?UTF-8?q?=E5=AE=9E=E5=90=8D=E8=AE=A4=E8=AF=81?= =?UTF-8?q?=E6=B5=8B=E8=AF=957.0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Application/Mobile/Controller/UserController.class.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Application/Mobile/Controller/UserController.class.php b/Application/Mobile/Controller/UserController.class.php index 138b72c15..0f2e762c5 100644 --- a/Application/Mobile/Controller/UserController.class.php +++ b/Application/Mobile/Controller/UserController.class.php @@ -1021,7 +1021,9 @@ 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']); + // $re = age_verify($_REQUEST['real_name'], $_REQUEST['idcard']); + $re =age($_REQUEST['real_name'], $_REQUEST['idcard']); + dump($re);die(); if ($re == 0) { $this->ajaxReturn(array('status' => 0, 'info' => '审核失败!', 'url' => U('User/userauth'))); } From 356af04937c8f902048f4931e7002cb2d0e6f18f Mon Sep 17 00:00:00 2001 From: chenzhi Date: Mon, 2 Dec 2019 18:31:40 +0800 Subject: [PATCH 5/6] =?UTF-8?q?=E5=AE=9E=E5=90=8D=E8=AE=A4=E8=AF=817.0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Application/Mobile/Controller/UserController.class.php | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/Application/Mobile/Controller/UserController.class.php b/Application/Mobile/Controller/UserController.class.php index 0f2e762c5..5d9762076 100644 --- a/Application/Mobile/Controller/UserController.class.php +++ b/Application/Mobile/Controller/UserController.class.php @@ -1021,9 +1021,7 @@ 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']); - $re =age($_REQUEST['real_name'], $_REQUEST['idcard']); - dump($re);die(); + $re =age_verify($_REQUEST['idcard'],$_REQUEST['real_name']); if ($re == 0) { $this->ajaxReturn(array('status' => 0, 'info' => '审核失败!', 'url' => U('User/userauth'))); } From 7cbec414db56179e95c14d9a53b2cc1378affd2d Mon Sep 17 00:00:00 2001 From: chenzhi Date: Mon, 2 Dec 2019 18:46:55 +0800 Subject: [PATCH 6/6] =?UTF-8?q?=E5=AE=9E=E5=90=8D=E8=AE=A4=E8=AF=818.0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Application/Common/Common/function.php | 2 +- .../Controller/UserController.class.php | 48 ++++++++++++------- 2 files changed, 33 insertions(+), 17 deletions(-) diff --git a/Application/Common/Common/function.php b/Application/Common/Common/function.php index 61fab3954..c7d4909d2 100644 --- a/Application/Common/Common/function.php +++ b/Application/Common/Common/function.php @@ -1198,7 +1198,7 @@ function age_verify($cardno, $name) return 2; } } elseif (isset($date['status']) && $date['status'] != '01') { - return -2; + return $date['status']; } else { return $date; } diff --git a/Application/Mobile/Controller/UserController.class.php b/Application/Mobile/Controller/UserController.class.php index 5d9762076..98dfee58b 100644 --- a/Application/Mobile/Controller/UserController.class.php +++ b/Application/Mobile/Controller/UserController.class.php @@ -1021,23 +1021,39 @@ class UserController extends BaseController if ($status == 0) { $this->ajaxReturn(array('status' => 0, 'info' => '实名认证暂未开启!', 'url' => U('User/userauth'))); } else { - $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 == 1) { - $resdata = 2;//成年 - } - if ($re == 2) { - $resdata = 3;//未成年 + //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 == "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) { $model = D('User')->where($map)->save(array('real_name' => $_REQUEST['real_name'], 'idcard' => $_REQUEST['idcard'], 'age_status' => $resdata));