master
cody 6 months ago
parent c8e9e9e589
commit 1aafa7dacd

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

Loading…
Cancel
Save