Selaa lähdekoodia

恢复短信验证码发送逻辑

- sendSmsCaptcha() 取消注释,恢复真实调用 SmsCaptchaService::handle()
- 此前 2cd3b16c 为联调注释了发送逻辑,接口固定返回「发送成功」但未调用短信通道
tanlie 11 tuntia sitten
vanhempi
säilyke
571cd6c65f
1 muutettua tiedostoa jossa 4 lisäystä ja 4 poistoa
  1. 4 4
      app/api/controller/Captcha.php

+ 4 - 4
app/api/controller/Captcha.php

@@ -40,10 +40,10 @@ class Captcha extends Controller
      */
     public function sendSmsCaptcha(): Json
     {
-        #$SmsCaptchaService = new SmsCaptchaService;
-        #if ($SmsCaptchaService->handle($this->postForm())) {
+        $SmsCaptchaService = new SmsCaptchaService;
+        if ($SmsCaptchaService->handle($this->postForm())) {
             return $this->renderSuccess('发送成功,请注意查收');
-        #}
-        #return $this->renderError($SmsCaptchaService->getError() ?: '短信发送失败');
+        }
+        return $this->renderError($SmsCaptchaService->getError() ?: '短信发送失败');
     }
 }