13283339616 6 years ago
parent
commit
689f8adc8a
1 changed files with 8 additions and 8 deletions
  1. 8 8
      app/Api/V1/Controllers/UserController.php

+ 8 - 8
app/Api/V1/Controllers/UserController.php

@@ -101,7 +101,7 @@ class UserController extends BaseController {
101 101
     }
102 102
 
103 103
     public function validPhone($phone) {
104
-	if(preg_match("/^1[34578]{1}\d{9}$/",$phone)){ 
104
+	if(preg_match("/^1[345678]{1}\d{9}$/",$phone)){
105 105
 	     return true;
106 106
 	}
107 107
 	return false;
@@ -147,7 +147,7 @@ class UserController extends BaseController {
147 147
      */
148 148
     public function sendCode(Request $request) {
149 149
         $validator = Validator::make($request->all(), [
150
-            'mobile' => 'required|regex:/^1[34578][0-9]{9}$/',
150
+            'mobile' => 'required|regex:/^1[345678][0-9]{9}$/',
151 151
         ], [
152 152
             'mobile.required' => '手机号不能为空',
153 153
             'mobile.regex' => '手机号格式错误',
@@ -227,7 +227,7 @@ class UserController extends BaseController {
227 227
     public function register(Request $request)
228 228
     {
229 229
         $validator = Validator::make($request->all(), [
230
-            'mobile'     => 'required|regex:/^1[34578][0-9]{9}$/',
230
+            'mobile'     => 'required|regex:/^1[345678][0-9]{9}$/',
231 231
             'password' => 'required|string|min:6',
232 232
             'c_password' => 'required|same:password',
233 233
         ],[
@@ -241,8 +241,8 @@ class UserController extends BaseController {
241 241
         if ($validator->fails()) {
242 242
             return $this->response->array(self::returnValue(['msg'=>Base::formatValidator($validator)], 10009));
243 243
         }
244
-        $mobile = $request->get('mobile');
245
-        $password = $request->get('password');
244
+        $mobile = $request->input('mobile');
245
+        $password = $request->input('password');
246 246
         $channel_id = $request->header('channel_id',0);
247 247
         $user_info = self::checkUserByMobile($mobile, false);
248 248
         if (!$user_info) {
@@ -266,7 +266,7 @@ class UserController extends BaseController {
266 266
     public function login(Request $request)
267 267
     {
268 268
         $validator = Validator::make($request->all(), [
269
-            'mobile'     => 'required|regex:/^1[34578][0-9]{9}$/',
269
+            'mobile'     => 'required|regex:/^1[345678][0-9]{9}$/',
270 270
             'password' => 'required|string|min:6',
271 271
         ],[
272 272
             'mobile.required' => '手机号不能为空',
@@ -359,7 +359,7 @@ class UserController extends BaseController {
359 359
     public function checkMobile(Request $request)
360 360
     {
361 361
         $validator = Validator::make($request->all(), [
362
-            'mobile'     => 'required|regex:/^1[34578][0-9]{9}$/',
362
+            'mobile'     => 'required|regex:/^1[345678][0-9]{9}$/',
363 363
         ],[
364 364
             'mobile.required' => '手机号不能为空',
365 365
             'mobile.regex' => '手机号格式错误',
@@ -507,7 +507,7 @@ class UserController extends BaseController {
507 507
     public function bindMobile(Request $request)
508 508
     {
509 509
         $validator = Validator::make($request->all(), [
510
-            'mobile'     => 'required|regex:/^1[34578][0-9]{9}$/',
510
+            'mobile'     => 'required|regex:/^1[345678][0-9]{9}$/',
511 511
             'password' => 'required|string|min:6',
512 512
             'c_password' => 'required|same:password',
513 513
         ],[