// 解析URL 参数
getUrlParam(name) {
let reg = new RegExp('(^|&)'+ name + '=([^&]*)(&|$)')
let r = window.location.search.substr(1).match(reg)
if(r!=null){
return unescape(r[2])
}
return null
},
this.code = this.getUrlParam('code'); // 截取code
this.state = this.getUrlParam('state'); // 截取code
解析URL 参数
最新推荐文章于 2024-01-22 21:08:17 发布