获取URL参数
function queryParam(url = location.href) {
url = url.substring(url.indexOf('?') + 1)
const params = {}
url.split('&').forEach(v => {
const temp = v.split('=')
if (temp.length === 2) {
params[temp[0]] = temp[1]
}
})
return params
}