//分离url成对象
var separateUrl = (url) => {
//url = 'https://xcx.wxdcxs.com/app/index.php?i=43&t=0'
var arr = url.split('?')[1].split('&')
var res = {}
arr.forEach((item) => {
var r = item.split('=')
res[r[0]] = r[1]
})
return res
}
网友评论