| 12345678910111213141516171819202122232425262728293031323334353637383940 |
- <?php
- declare(strict_types=1);
- /**
- * This file is part of Hyperf.
- *
- * @link https://www.hyperf.io
- * @document https://hyperf.wiki
- * @contact group@hyperf.io
- * @license https://github.com/hyperf/hyperf/blob/master/LICENSE
- *
- */
- namespace App\Controller\Api;
- use App\Model\User;
- use App\Service\CaptchService;
- use Hyperf\HttpServer\Annotation\AutoController;
- use Hyperf\HttpServer\Annotation\RequestMapping;
- use Hyperf\RateLimit\Annotation\RateLimit;
- /**
- * Class LotteryController
- * @package App\Controller\Api
- * @AutoController()
- */
- class CommonController extends BaseController
- {
- /**
- * 获取图形验证码
- * @RequestMapping(path="get_captcha", methods="get,post")
- * @RateLimit(create=1, capacity=3)
- */
- public function verifyCode()
- {
- return CaptchService::makeCode();
- }
- }
|