CaptchaVerify.php 787 B

123456789101112131415161718192021222324252627282930313233343536
  1. <?php
  2. namespace App\Components;
  3. /**
  4. * Class CaptchaVerify 验证码
  5. *
  6. * @package App\Components
  7. */
  8. Class CaptchaVerify
  9. {
  10. /**
  11. * 从后台获取 Geetest_id 和 Geetest_key
  12. */
  13. public static function geetestCaptchaGetConfig()
  14. {
  15. return [
  16. "geetest_id" => Helpers::systemConfig()["geetest_id"],
  17. "geetest_key" => Helpers::systemConfig()["geetest_key"]
  18. ];
  19. }
  20. /**
  21. * 从后台获取 google_captcha_sitekey 和 google_captcha_secret
  22. */
  23. public static function googleCaptchaGetConfig()
  24. {
  25. return [
  26. "sitekey" => Helpers::systemConfig()["google_captcha_sitekey"],
  27. "secret" => Helpers::systemConfig()["google_captcha_secret"],
  28. "options" => []
  29. ];
  30. }
  31. }
  32. ?>