/**
* 获取授权 URL
*/
public function getAuthorizeUrl()
{
if (null === $this->state) {
$this->state = Util::getRandomString(16);
}
$this->stateManager->setState($this->state);
$query = array('appid' => $this->appid, 'redirect_uri' => $this->redirectUri ?: Util::getCurrentUrl(), 'response_type' => 'code', 'scope' => $this->resolveScope(), 'state' => $this->state);
return $this->resolveAuthorizeUrl() . '?' . http_build_query($query);
}