export function urlAddParams(params) {
let str = '';
let keys = Object.keys(params);
let len = keys.length - 1;
keys.forEach((key, index) => {str += key + '=' + params[key] + (index < len ? '&' : '');
});
let {origin, pathname, search, hash} = window.location;
search = search === ''?'?': search +'&';
return origin + pathname + search + str + hash;
}