diff --git a/app/Http/Controllers/Mobile/UserController.php b/app/Http/Controllers/Mobile/UserController.php index e6c5620..584c057 100755 --- a/app/Http/Controllers/Mobile/UserController.php +++ b/app/Http/Controllers/Mobile/UserController.php @@ -312,20 +312,12 @@ class UserController extends CommonController $messages = [ 'mobile.required' => '手机号必填', 'mobile.numeric' => '手机号格式错误', -<<<<<<< HEAD - // 'code' => '验证码必填', -======= 'code' => '验证码必填', ->>>>>>> 8508a4aca7d83d334aa2ec18b4291c6d5750a769 'is_bind' => '是否绑定必填', ]; $validator = Validator::make($all, [ 'mobile' => 'required|numeric', -<<<<<<< HEAD - // 'code' => 'required', -======= 'code' => 'required', ->>>>>>> 8508a4aca7d83d334aa2ec18b4291c6d5750a769 'is_bind' => 'required', ], $messages); if ($validator->fails()) { @@ -369,32 +361,19 @@ class UserController extends CommonController $messages = [ 'mobile.required' => '手机号必填', 'mobile.numeric' => '手机号格式错误', -<<<<<<< HEAD - // 'code' => '验证码必填', - ]; - $validator = Validator::make($all, [ - 'mobile' => 'required|numeric', - // 'code' => 'required', -======= 'code' => '验证码必填', ]; $validator = Validator::make($all, [ 'mobile' => 'required|numeric', 'code' => 'required', ->>>>>>> 8508a4aca7d83d334aa2ec18b4291c6d5750a769 ], $messages); if ($validator->fails()) { return $this->fail([StarterResponseCode::START_ERROR_PARAMETER, implode(',', $validator->errors()->all())]); } $key = 'sms_' . $all['mobile']; $check = Cache::get($key); -<<<<<<< HEAD - // if (empty($check)) return $this->fail([ResponseCode::ERROR_BUSINESS, '请先发送验证码']); - // if ($check['code'] != $all['code']) return $this->fail([ResponseCode::ERROR_BUSINESS, '验证码错误']); -======= if (empty($check)) return $this->fail([ResponseCode::ERROR_BUSINESS, '请先发送验证码']); if ($check['code'] != $all['code']) return $this->fail([ResponseCode::ERROR_BUSINESS, '验证码错误']); ->>>>>>> 8508a4aca7d83d334aa2ec18b4291c6d5750a769 // 判断手机号是否存在 $hasMobile = User::where('mobile', $all['mobile'])->first(); if ($hasMobile) {