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