|
|
|
|
@ -323,10 +323,10 @@ class UserController extends CommonController
|
|
|
|
|
if ($validator->fails()) {
|
|
|
|
|
return $this->fail([StarterResponseCode::START_ERROR_PARAMETER, implode(',', $validator->errors()->all())]);
|
|
|
|
|
}
|
|
|
|
|
// $key = 'sms_' . $all['mobile'];
|
|
|
|
|
// $check = Cache::get($key);
|
|
|
|
|
// if (empty($check)) return $this->fail([ResponseCode::ERROR_BUSINESS, '请先发送验证码']);
|
|
|
|
|
// if ($check['code'] != $all['code']) return $this->fail([ResponseCode::ERROR_BUSINESS, '验证码错误']);
|
|
|
|
|
$key = 'sms_' . $all['mobile'];
|
|
|
|
|
$check = Cache::get($key);
|
|
|
|
|
if (empty($check)) return $this->fail([ResponseCode::ERROR_BUSINESS, '请先发送验证码']);
|
|
|
|
|
if ($check['code'] != $all['code']) return $this->fail([ResponseCode::ERROR_BUSINESS, '验证码错误']);
|
|
|
|
|
// 判断手机号是否存在
|
|
|
|
|
$hasMobile = User::where('mobile', $all['mobile'])->where('id', '!=', $this->getUserId())->first();
|
|
|
|
|
if ($hasMobile) {
|
|
|
|
|
|