后台 手机号规则 实名认证修改

master
tping 4 years ago
parent 5cf8f2ea10
commit 481646222f

@ -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();

@ -97,13 +97,13 @@
<td class="l noticeinfo">实名认证</td>
<td class="r table_radio">
<span class="form_radio table_btn player_table_btn">
<switch name="data.age_status">
<case value="0">未认证</case>
<case value="1">未通过</case>
<case value="2">已认证</case>
<case value="3">未成年</case>
<default />意外数据
</switch>
<select name="age_status">
<option value="0" <if condition="$data['age_status'] eq 0">selected</if> >未认证</option>
<option value="1" <if condition="$data['age_status'] eq 1">selected</if> >未通过</option>
<option value="2" <if condition="$data['age_status'] eq 2">selected</if> >已认证</option>
<option value="3" <if condition="$data['age_status'] eq 3">selected</if> >未成年</option>
</select>
</span><span class="notice-text">需玩家认证真实姓名和身份证号码</span></td>
</tr>
<tr>
@ -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;

Loading…
Cancel
Save