diff --git a/public/login.js b/public/login.js index a109188..de7ba7e 100644 --- a/public/login.js +++ b/public/login.js @@ -25,7 +25,10 @@ document.querySelector("#login").onsubmit = async (event) => { } const refer = decodeURIComponent(params.get("refer")); params.delete("refer") - window.location.search = params.toString(); - window.location.pathname = refer; + if (params.size === 0) { + window.location.pathname = refer; + return; + } + window.location = `${refer}?${params.toString()}`; };