export function objToUrl(obj) {
  let uri = '';
  let keys = Object.keys(obj);
  keys.forEach(item => {
    uri += '&' + item + '=' + obj[item];
  });

  uri = uri.substr(1);

  return uri;
}

export function parseQueryString(url) {
    var obj = {};
    var keyvalue = [];
    var key = "",
        value = "";
    var paraString = url.substring(url.indexOf("?") + 1, url.length).split("&");
    for (var i in paraString) {
        keyvalue = paraString[i].split("=");
        key = keyvalue[0];
        value = keyvalue[1];
        obj[key] = value;
    }
    return obj;
}



  