From 2449d639ad0998cdf8d4c3dbba9c1e1753967005 Mon Sep 17 00:00:00 2001 From: zhanglingsheng Date: Wed, 20 Nov 2019 16:03:13 +0800 Subject: [PATCH] =?UTF-8?q?=E8=BA=AB=E4=BB=BD=E8=AF=81=E4=BF=A1=E6=81=AF?= =?UTF-8?q?=E5=BD=95=E5=85=A5=E5=92=8C=E8=81=94=E7=B3=BB=E5=AE=A2=E6=9C=8D?= =?UTF-8?q?=E9=93=BE=E6=8E=A5=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Sdk/Controller/GameController.class.php | 7 ++- .../Sdk/Controller/UserController.class.php | 51 +++++++++++-------- Data/update.sql | 12 ++++- 3 files changed, 46 insertions(+), 24 deletions(-) diff --git a/Application/Sdk/Controller/GameController.class.php b/Application/Sdk/Controller/GameController.class.php index 6c362d00..22ce658e 100644 --- a/Application/Sdk/Controller/GameController.class.php +++ b/Application/Sdk/Controller/GameController.class.php @@ -69,8 +69,13 @@ class GameController extends BaseController{ } else { $gap = "&"; } + if($contact_cs[$k]['name'] == 'support') { + $contact_cs[$k]['act'] = "mqq://im/chat?chat_type=wpa&uin=" . $contact_cs[$k]['act'] . "&version=1&src_type=web"; + $contact_cs[$k]['ios_url'] = "mqq://im/chat?chat_type=wpa&uin=" . $contact_cs[$k]['ios_url'] . "&version=1&src_type=web&action=openurl"; + } else { + $contact_cs[$k]['ios_url'] = $contact_cs[$k]['ios_url']."{$gap}action=openurl"; + } - $contact_cs[$k]['ios_url'] = $contact_cs[$k]['ios_url']."{$gap}action=openurl"; } } diff --git a/Application/Sdk/Controller/UserController.class.php b/Application/Sdk/Controller/UserController.class.php index bec5b006..b1890c08 100644 --- a/Application/Sdk/Controller/UserController.class.php +++ b/Application/Sdk/Controller/UserController.class.php @@ -2080,6 +2080,7 @@ class UserController extends BaseController { C(api('Config/lists')); $user = json_decode(base64_decode(file_get_contents("php://input")), true); + if (empty($user['user_id']) || empty($user['idcard']) || empty($user['real_name'])) { $this -> set_message(1066, "fail", "用户数据异常"); @@ -2095,7 +2096,6 @@ class UserController extends BaseController $checkidcard = new \Think\Checkidcard(); $invidcard = $checkidcard -> checkIdentity($data['idcard']); if (!$invidcard) { - $this -> set_message(1086, "fail", "身份证号码填写不正确!"); } @@ -2109,35 +2109,42 @@ class UserController extends BaseController } //身份证认证 if (C('tool_age.status') == 0) { - if (is_adult($data['idcard'])) { $data['age_status'] = 2; // 成年 } else { $data['age_status'] = 3; // 未成年 } } else { + if(M('idcard', 'tab_')->where(['name' => $data['real_name'],'id_card' => $data['idcard']])->find()) { + $data['age_status'] = is_adult($data['idcard']) ? 2 : 3; + } else { + $re = age_verify($data['idcard'], $data['real_name']); + switch ($re) { - $re = age_verify($data['idcard'], $data['real_name']); - switch ($re) { - - case - 1: - $this -> set_message(1067, "fail", "数量已经使用完!"); - break; - case - 2: - $this -> set_message(1068, "fail", "连接接口失败"); - break; - case 0: - $this -> set_message(1069, "fail", "用户数据不匹配"); - break; - case 1://成年 - $data['age_status'] = 2; - break; - case 2://未成年 - $data['age_status'] = 3; - break; - - default: + case - 1: + $this -> set_message(1067, "fail", "数量已经使用完!"); + break; + case - 2: + $this -> set_message(1068, "fail", "连接接口失败"); + break; + case 0: + $this -> set_message(1069, "fail", "用户数据不匹配"); + break; + case 1://成年 + $data['age_status'] = 2; + break; + case 2://未成年 + $data['age_status'] = 3; + break; + + default: + } + if($re == 1 || $re == 2) { + $arr['name'] = $data['real_name']; + $arr['id_card'] = $data['idcard']; + M('idcard', 'tab_')->data($arr)->add(); + } } } diff --git a/Data/update.sql b/Data/update.sql index 4723a230..bdceed08 100644 --- a/Data/update.sql +++ b/Data/update.sql @@ -165,4 +165,14 @@ ADD COLUMN `user_token` char(64) CHARACTER SET utf8 COLLATE utf8_general_ci NOT -- ---------------------------- -- 2019-10-17 zyx -- ---------------------------- -alter table `tab_giftbag` modify COLUMN `giftbag_version` tinyint(2) COMMENT '运营平台 0双平台 1and 2ios 3超级签' \ No newline at end of file +alter table `tab_giftbag` modify COLUMN `giftbag_version` tinyint(2) COMMENT '运营平台 0双平台 1and 2ios 3超级签' + +-- ---------------------------- +-- 2019-11-20 zyx +-- ---------------------------- +CREATE TABLE `tab_idcard` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `name` varchar(80) NOT NULL COMMENT '姓名', + `id_card` varchar(20) DEFAULT NULL COMMENT '身份证号码', + PRIMARY KEY (`id`) +) ENGINE=MyISAM AUTO_INCREMENT=3 DEFAULT CHARSET=utf8 COMMENT='正确身份证信息'; \ No newline at end of file