container->get(LoginRequest::class); $request->scene('wechatMobileLogin')->validateResolved(); $LoginService = new LoginService(); $data = $LoginService->wechatMobileLogin(); return $this->response->json($data); } /** * 手机号登陆 * @return ResponseInterface * @throws ContainerExceptionInterface * @throws NotFoundExceptionInterface */ public function mobileLogin(): ResponseInterface { // 验证参数 $request = $this->container->get(LoginRequest::class); $request->scene('mobileLogin')->validateResolved(); $LoginService = new LoginService(); $data = $LoginService->mobileLogin(); 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 { // 验证参数 $request = $this->container->get(LoginRequest::class); $request->scene('wxAuthorize')->validateResolved(); $LoginService = new LoginService(); $data = $LoginService->wxAuthorize(); return $this->response->json($data); } }