function queryParam(name, url = location.search) {
let res = {}
const keys = url.match(/[w]+(?=[=]{1})/g)
const val = url.match(/(?:[=]{1})[w]*/g)
keys.forEach((item, index) => {
res[item] = val[index].replace('=', '')
})
return res[name] || null
}