37 lines
1.0 KiB
PHP
37 lines
1.0 KiB
PHP
<?php
|
|
|
|
declare(strict_types=1);
|
|
|
|
namespace App\Controller\Api;
|
|
|
|
use App\Controller\AbstractController;
|
|
use App\Middleware\Api\JwtAuthMiddleware;
|
|
use App\Request\Api\UserRequest;
|
|
use App\Service\Api\User\BindPhoneByWxService;
|
|
use Hyperf\HttpServer\Annotation\Controller;
|
|
use Hyperf\HttpServer\Annotation\Middlewares;
|
|
use Hyperf\HttpServer\Annotation\RequestMapping;
|
|
use Hyperf\Validation\Annotation\Scene;
|
|
use Psr\Container\ContainerExceptionInterface;
|
|
use Psr\Container\NotFoundExceptionInterface;
|
|
|
|
#[Controller(prefix: 'api/user')]
|
|
#[Middlewares([
|
|
JwtAuthMiddleware::class,
|
|
])]
|
|
class UserController extends AbstractController
|
|
{
|
|
/**
|
|
* @param UserRequest $request
|
|
* @return array
|
|
* @throws ContainerExceptionInterface
|
|
* @throws NotFoundExceptionInterface
|
|
*/
|
|
#[RequestMapping(path: 'bind_phone/wx_code',methods: 'post')]
|
|
#[Scene(scene: 'bind_phone_wx')]
|
|
public function bind_phone_by_wx_code(UserRequest $request)
|
|
{
|
|
return (new BindPhoneByWxService)->handle();
|
|
}
|
|
}
|