/*
 * @Author: sjl
 * @Date: 2023-05-11 19:21:49
 * @Descripttion:
 */
//设置缓存免登录
function getQueryParams() {
  let search = location.href;
  if (!search) {
    return {};
  }
  search = search.split('?')[1];
  const queryParams = {};
  let pairs = search.split('%22');
  for (let i = 0; i < pairs.length; i++) {
    let pair = pairs[i].split('=');
    let name = decodeURIComponent(pair[0]);
    let value = decodeURIComponent(pair[1] || '');
    queryParams[name] = value;
  }
  return queryParams;
}
export default getQueryParams;
