var getRequest = this.getRequest();
if (getRequest.code) {
this.code = getRequest.code;
} else {
var pageUrl = window.location.href
.replace(/[/]/g, "%2f")
.replace(/[:]/g, "%3a")
.replace(/[#]/g, "%23")
.replace(/[&]/g, "%26")
.replace(/[=]/g, "%3d");
var url =
"https://open.weixin.qq.com/connect/oauth2/authorize?appid=" +
"wxee308b1fb101ea82" +
"&redirect_uri=" +
pageUrl + http://www.561949.com/NewsDetail/1011204.html.html
"&response_type=code&scope=snsapi_base&state=STATE&connect_redirect=1#wechat_redirect";
window.location.href = url;
}
console.log("CODE:" + getRequest.code);