新增微信授权接口

This commit is contained in:
2023-03-17 11:52:12 +08:00
parent 2d88e29734
commit a3eb0e3dd0
3 changed files with 118 additions and 2 deletions
+16 -1
View File
@@ -7,6 +7,11 @@ use App\Services\LoginService;
use Psr\Container\ContainerExceptionInterface;
use Psr\Container\NotFoundExceptionInterface;
use Psr\Http\Message\ResponseInterface;
use Symfony\Contracts\HttpClient\Exception\ClientExceptionInterface;
use Symfony\Contracts\HttpClient\Exception\DecodingExceptionInterface;
use Symfony\Contracts\HttpClient\Exception\RedirectionExceptionInterface;
use Symfony\Contracts\HttpClient\Exception\ServerExceptionInterface;
use Symfony\Contracts\HttpClient\Exception\TransportExceptionInterface;
/**
* 登陆
@@ -42,7 +47,17 @@ class LoginController extends AbstractController
return $this->response->json($data);
}
// 微信授权接口
/**
* 微信授权接口
* @return ResponseInterface
* @throws ContainerExceptionInterface
* @throws NotFoundExceptionInterface
* @throws ClientExceptionInterface
* @throws DecodingExceptionInterface
* @throws RedirectionExceptionInterface
* @throws ServerExceptionInterface
* @throws TransportExceptionInterface
*/
public function wxAuthorize(): ResponseInterface
{
// 验证参数