Commit d6cca141 by 赵增煜

fix

parent d99c8b38
...@@ -65,12 +65,12 @@ public function smsCode(Request $request) ...@@ -65,12 +65,12 @@ public function smsCode(Request $request)
$mobile = $request->input('mobile'); $mobile = $request->input('mobile');
$login_type = $request->input('login_type'); $login_type = $request->input('login_type');
if (! $mobile) { if (! $mobile) {
return response()->json(['error' => '手机号不能为空']); return $this->failed('手机号不能为空');
} }
// 验证手机号格式 // 验证手机号格式
if (! preg_match('/^1[3-9]\d{9}$/', $mobile)) { if (! preg_match('/^1[3-9]\d{9}$/', $mobile)) {
return response()->json(['error' => '手机号格式不正确']); return $this->failed('手机号格式不正确');
} }
// // 增加手机验证码发送频率限制 // // 增加手机验证码发送频率限制
// $today = date('Y-m-d'); // $today = date('Y-m-d');
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment