|
|
@ -1540,9 +1540,13 @@ class UserController extends BaseController
|
|
|
|
{
|
|
|
|
{
|
|
|
|
$data = json_decode(base64_decode(file_get_contents("php://input")), true);
|
|
|
|
$data = json_decode(base64_decode(file_get_contents("php://input")), true);
|
|
|
|
$phone = $data['phone'];
|
|
|
|
$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, "手机格式不正确");
|
|
|
|
$this -> new_set_message(1098, "手机格式不正确");
|
|
|
|
die;
|
|
|
|
die;
|
|
|
|
|
|
|
|
} */
|
|
|
|
|
|
|
|
if (!preg_match('/^[1]([3-9])[0-9]{9}$/', $phone)) {
|
|
|
|
|
|
|
|
$this->new_set_message(1098, "手机格式不正确");
|
|
|
|
|
|
|
|
die;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if ($data['reg'] == 1) { /* 注册检查 */
|
|
|
|
if ($data['reg'] == 1) { /* 注册检查 */
|
|
|
|
$user = M('user', 'tab_') -> where(['phone|account' => $phone]) -> find();
|
|
|
|
$user = M('user', 'tab_') -> where(['phone|account' => $phone]) -> find();
|
|
|
|