js 获取url中的参数值
getUrlParam(key) { // 获取url携带key对应val值
var str = new URLSearchParams(window.location.search)
return str.get(key)
}
调用方法: this.getUrlParam('quearyName')
getUrlParam(key) { // 获取url携带key对应val值
var str = new URLSearchParams(window.location.search)
return str.get(key)
}
调用方法: this.getUrlParam('quearyName')