<script> var code = GetQueryString('code'); var callback = 'personal.html'; var appId = "wx70c81e11981cab3d"; var redirect_uri = window.location.origin + window.location.pathname; var wx_link = 'https://open.weixin.qq.com/connect/oauth2/au
function getUrlParam(name){ var reg = new RegExp('(^|&)' + name + '=([^&]*)(&|$)'); var result = window.location.search.substr(1).match(reg); return result ? decodeURIComponent(result[2]) : null; } 其中window.location.search为获取链接参数的方法,之前一直使用wind