From ca5e81bb2cd6dea76b1eef18cb607b74456e851a Mon Sep 17 00:00:00 2001 From: zhanglingsheng Date: Thu, 21 Nov 2019 23:14:31 +0800 Subject: [PATCH] =?UTF-8?q?=E8=AE=B0=E5=BD=95=E8=BA=AB=E4=BB=BD=E8=AF=81?= =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Sdk/Controller/UserController.class.php | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) diff --git a/Application/Sdk/Controller/UserController.class.php b/Application/Sdk/Controller/UserController.class.php index c0f4c8ad..1d9d2c6a 100644 --- a/Application/Sdk/Controller/UserController.class.php +++ b/Application/Sdk/Controller/UserController.class.php @@ -2129,17 +2129,22 @@ class UserController extends BaseController if($model['status'] == 1) { $data['age_status'] = is_adult($data['idcard']) ? 2 : 3; } elseif ($model['status'] == 0) { + $arr['num'] = $model['num']+1; + M('idcard_log', 'tab_')->where(['id' => $model['id']])->save($arr); $this -> set_message(1069, "fail", "用户数据不匹配"); } } else { $re = age_verify($data['idcard'], $data['real_name']); - $arr['name'] = $data['real_name']; - $arr['id_card'] = $data['idcard']; - $arr['user_id'] = $user['user_id']; - $arr['status'] = ($re == 1 || $re == 2 ) ? 1 : 0; - $arr['ip'] = get_client_ip(); - $arr['create_time'] = time(); - M('idcard_log', 'tab_')->data($arr)->add(); + if($re != -1) + { + $arr['name'] = $data['real_name']; + $arr['id_card'] = $data['idcard']; + $arr['user_id'] = $user['user_id']; + $arr['status'] = ($re == 1 || $re == 2 ) ? 1 : 0; + $arr['ip'] = get_client_ip(); + $arr['create_time'] = time(); + M('idcard_log', 'tab_')->data($arr)->add(); + } switch ($re) { case - 1: