
export function queryStr(params: any) {
    let paramsStr: string = '?'
    Object.keys(params).forEach((key: string) => {
        paramsStr += `${key}=${params[key]}&`
    })
    return paramsStr.replace(/&$/, '')
}
export function queryObj(str: string) {
    let obj: any = {}
    str.replace(/^\?/,'').split('&').forEach((item:any)=>{
        item = item.split('=')
        obj[item[0]] = item[1]
    })
    return obj
}