Merge branch 'dev' of 47.111.118.107:/srv/git/sdk into dev

master
tpingzhang 5 years ago
commit dd3bb8233a

@ -69,8 +69,13 @@ class GameController extends BaseController{
} else { } else {
$gap = "&"; $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";
} }
} }

@ -2080,6 +2080,7 @@ class UserController extends BaseController
{ {
C(api('Config/lists')); C(api('Config/lists'));
$user = json_decode(base64_decode(file_get_contents("php://input")), true); $user = json_decode(base64_decode(file_get_contents("php://input")), true);
if (empty($user['user_id']) || empty($user['idcard']) || empty($user['real_name'])) { if (empty($user['user_id']) || empty($user['idcard']) || empty($user['real_name'])) {
$this -> set_message(1066, "fail", "用户数据异常"); $this -> set_message(1066, "fail", "用户数据异常");
@ -2095,7 +2096,6 @@ class UserController extends BaseController
$checkidcard = new \Think\Checkidcard(); $checkidcard = new \Think\Checkidcard();
$invidcard = $checkidcard -> checkIdentity($data['idcard']); $invidcard = $checkidcard -> checkIdentity($data['idcard']);
if (!$invidcard) { if (!$invidcard) {
$this -> set_message(1086, "fail", "身份证号码填写不正确!"); $this -> set_message(1086, "fail", "身份证号码填写不正确!");
} }
@ -2109,35 +2109,42 @@ class UserController extends BaseController
} }
//身份证认证 //身份证认证
if (C('tool_age.status') == 0) { if (C('tool_age.status') == 0) {
if (is_adult($data['idcard'])) { if (is_adult($data['idcard'])) {
$data['age_status'] = 2; // 成年 $data['age_status'] = 2; // 成年
} else { } else {
$data['age_status'] = 3; // 未成年 $data['age_status'] = 3; // 未成年
} }
} else { } 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']); case - 1:
switch ($re) { $this -> set_message(1067, "fail", "数量已经使用完!");
break;
case - 1: case - 2:
$this -> set_message(1067, "fail", "数量已经使用完!"); $this -> set_message(1068, "fail", "连接接口失败");
break; break;
case - 2: case 0:
$this -> set_message(1068, "fail", "连接接口失败"); $this -> set_message(1069, "fail", "用户数据不匹配");
break; break;
case 0: case 1://成年
$this -> set_message(1069, "fail", "用户数据不匹配"); $data['age_status'] = 2;
break; break;
case 1://成年 case 2://未成年
$data['age_status'] = 2; $data['age_status'] = 3;
break; break;
case 2://未成年
$data['age_status'] = 3; default:
break;
default:
}
if($re == 1 || $re == 2) {
$arr['name'] = $data['real_name'];
$arr['id_card'] = $data['idcard'];
M('idcard', 'tab_')->data($arr)->add();
}
} }
} }

@ -165,4 +165,14 @@ ADD COLUMN `user_token` char(64) CHARACTER SET utf8 COLLATE utf8_general_ci NOT
-- ---------------------------- -- ----------------------------
-- 2019-10-17 zyx -- 2019-10-17 zyx
-- ---------------------------- -- ----------------------------
alter table `tab_giftbag` modify COLUMN `giftbag_version` tinyint(2) COMMENT '运营平台 0双平台 1and 2ios 3超级签' 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='正确身份证信息';
Loading…
Cancel
Save