From 481646222f033074ca113bed0e2a71d8b06c5ac5 Mon Sep 17 00:00:00 2001 From: tping Date: Tue, 8 Dec 2020 16:09:33 +0800 Subject: [PATCH] =?UTF-8?q?=E5=90=8E=E5=8F=B0=20=E6=89=8B=E6=9C=BA?= =?UTF-8?q?=E5=8F=B7=E8=A7=84=E5=88=99=20=E5=AE=9E=E5=90=8D=E8=AE=A4?= =?UTF-8?q?=E8=AF=81=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Admin/Controller/MemberController.class.php | 15 ++++++++++++++- Application/Admin/View/Member/edit.html | 16 ++++++++-------- 2 files changed, 22 insertions(+), 9 deletions(-) diff --git a/Application/Admin/Controller/MemberController.class.php b/Application/Admin/Controller/MemberController.class.php index 5e38df6c1..5af746288 100644 --- a/Application/Admin/Controller/MemberController.class.php +++ b/Application/Admin/Controller/MemberController.class.php @@ -514,6 +514,16 @@ class MemberController extends ThinkController /* if (!empty($data['idcard']) && !preg_match('/^[1-9]\d{7}((0\d)|(1[0-2]))(([0|1|2]\d)|3[0-1])\d{3}$|^[1-9]\d{5}[1-9]\d{3}((0\d)|(1[0-2]))(([0|1|2]\d)|3[0-1])\d{3}([0-9]|X)$/', $data['idcard'])) { $this->error('请输入正确的身份证号码'); }*/ + if ($data['age_status'] == 2 || $data['age_status'] == 3) { + $user = A('User', 'Event'); + $userInfo = $user->user_entity($id); + if (empty($userInfo['real_name'])) { + $this->error('真实姓名不能为空'); + } + if (empty($userInfo['idcard'])) { + $this->error('身份证号不能为空'); + } + } $res = $member->updateInfo($data); if ($res !== false) { @@ -713,7 +723,10 @@ class MemberController extends ThinkController public function changephone() { - if (preg_match('/^[1][3578][0-9]{9}/', $_POST['phone'])) { + if (strlen($_POST['phone']) != 11) { + $this->ajaxReturn(array("status" => 0, "msg" => "手机长度有误")); + } + if (preg_match('/^[1][0-9]{10}$/', $_POST['phone'])) { //重复判断 $where['phone'] = $_POST['phone']; $user = M('User', 'tab_')->where($where)->field('id,account')->find(); diff --git a/Application/Admin/View/Member/edit.html b/Application/Admin/View/Member/edit.html index 6c633c3e7..e3cc35045 100644 --- a/Application/Admin/View/Member/edit.html +++ b/Application/Admin/View/Member/edit.html @@ -97,13 +97,13 @@ 实名认证 - - 未认证 - 未通过 - 已认证 - 未成年 - 意外数据 - + + 需玩家认证真实姓名和身份证号码 @@ -450,7 +450,7 @@ value: '' }, function (phone) { var jsid = $('#selfid').val(); - preg = /^[1][3578][0-9]{9}/; + preg = /^[1][0-9]{10}$/; if (!preg.test(phone)) { layer.msg("手机号码不正确"); return false;