/**
 * 获取路由参数
 */
function useGetUrlQuery() {
  const urlQuery = new URLSearchParams(window.location.search);

  // 直接返回包含所有参数的对象
  const queryParams = {};
  for (const [key, value] of urlQuery.entries()) {
    queryParams[key] = value;
  }

  return queryParams;
}

export default useGetUrlQuery;
