CaptchaService.php 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. <?php
  2. // +----------------------------------------------------------------------
  3. // | Niucloud-admin 企业快速开发的saas管理平台
  4. // +----------------------------------------------------------------------
  5. // | 官方网址:https://www.niucloud.com
  6. // +----------------------------------------------------------------------
  7. // | niucloud团队 版权所有 开源版本可自由商用
  8. // +----------------------------------------------------------------------
  9. // | Author: Niucloud Team
  10. // +----------------------------------------------------------------------
  11. namespace app\service\admin\captcha;
  12. use app\service\core\captcha\CoreCaptchaImgService;
  13. use core\base\BaseAdminService;
  14. /**
  15. * 验证码服务层
  16. */
  17. class CaptchaService extends BaseAdminService
  18. {
  19. public function __construct()
  20. {
  21. parent::__construct();
  22. }
  23. /**
  24. * 创建验证码
  25. * @return array|null
  26. */
  27. public function create(){
  28. return (new CoreCaptchaImgService())->create();
  29. }
  30. /**
  31. * 核验验证码
  32. * @return true
  33. */
  34. public function check(){
  35. return (new CoreCaptchaImgService())->check();
  36. }
  37. public function verification(){
  38. return (new CoreCaptchaImgService())->verification();
  39. }
  40. }