|
|
@@ -73,7 +73,7 @@ class Sms extends Api
|
|
|
$mobile = $this->request->request("mobile");
|
|
|
$event = $this->request->request("event");
|
|
|
$event = $event ? $event : 'register';
|
|
|
-// $captcha = $this->request->request("captcha");
|
|
|
+ $captcha = $this->request->request("captcha");
|
|
|
|
|
|
if (!$mobile || !\think\Validate::regex($mobile, "^1\d{10}$")) {
|
|
|
$this->error(__('手机号不正确'));
|
|
|
@@ -91,11 +91,11 @@ class Sms extends Api
|
|
|
$this->error(__('未注册'));
|
|
|
}
|
|
|
}
|
|
|
-// $ret = Smslib::check($mobile, $captcha, $event);
|
|
|
-// if ($ret) {
|
|
|
+ $ret = Smslib::check($mobile, $captcha, $event);
|
|
|
+ if ($ret) {
|
|
|
$this->success(__('成功'));
|
|
|
-// } else {
|
|
|
-// $this->error(__('验证码不正确'));
|
|
|
-// }
|
|
|
+ } else {
|
|
|
+ $this->error(__('验证码不正确'));
|
|
|
+ }
|
|
|
}
|
|
|
}
|