request->server('http_referer', $this->request->url(true), null); $wechat = WechatService::getWebOauthInfo($url, $this->request->get('mode', 1), false); $openid = isset($wechat['openid']) ? $wechat['openid'] : ''; $unionid = empty($wechat['fansinfo']['unionid']) ? '' : $wechat['fansinfo']['unionid']; $configJson = json_encode(WechatService::getWebJssdkSign($url), JSON_UNESCAPED_UNICODE); $fansinfoJson = json_encode(isset($wechat['fansinfo']) ? $wechat['fansinfo'] : [], JSON_UNESCAPED_UNICODE); $html = <<contentType('application/x-javascript'); } }