/**
* 获取配置
*/
public function getConfig($asArray = false)
{
$options = array('appid' => $this->accessToken->getAppid(), 'url' => Util::getCurrentUrl(), 'timestamp' => Util::getTimestamp(), 'noncestr' => Util::getRandomString(), 'accesstoken' => $this->accessToken['access_token']);
// 按 ASCII 码排序
ksort($options);
$signature = http_build_query($options);
$signature = urldecode($signature);
$signature = sha1($signature);
$config = array('appId' => $options['appid'], 'scope' => 'jsapi_address', 'signType' => 'sha1', 'addrSign' => $signature, 'timeStamp' => $options['timestamp'], 'nonceStr' => $options['noncestr']);
return $asArray ? $config : Serializer::jsonEncode($config);
}