From 6fcb9a5662363fc19dac9b8f5e355c995618c62a Mon Sep 17 00:00:00 2001 From: tping Date: Sat, 11 Jan 2020 13:26:01 +0800 Subject: [PATCH] =?UTF-8?q?=E6=89=8B=E6=9C=BA=E5=8F=B7199=E6=AE=B5=20?= =?UTF-8?q?=E6=8F=90=E7=A4=BA=E6=A0=BC=E5=BC=8F=E4=B8=8D=E6=AD=A3=E7=A1=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Application/Sdk/Controller/UserController.class.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/Application/Sdk/Controller/UserController.class.php b/Application/Sdk/Controller/UserController.class.php index 78d7b96e..2b3c5297 100644 --- a/Application/Sdk/Controller/UserController.class.php +++ b/Application/Sdk/Controller/UserController.class.php @@ -1540,9 +1540,13 @@ class UserController extends BaseController { $data = json_decode(base64_decode(file_get_contents("php://input")), true); $phone = $data['phone']; - if (!preg_match('/^((13[0-9])|(14[5,7,9])|(15[^4])|(18[0-9])|(17[0,1,3,5,6,7,8]))\\d{8}$/', $phone)) { + /* if (!preg_match('/^((13[0-9])|(14[5,7,9])|(15[^4])|(18[0-9])|(17[0,1,3,5,6,7,8]))\\d{8}$/', $phone)) { $this -> new_set_message(1098, "手机格式不正确"); die; + } */ + if (!preg_match('/^[1]([3-9])[0-9]{9}$/', $phone)) { + $this->new_set_message(1098, "手机格式不正确"); + die; } if ($data['reg'] == 1) { /* 注册检查 */ $user = M('user', 'tab_') -> where(['phone|account' => $phone]) -> find();