保存今天的修改

This commit is contained in:
songxinnuo
2026-11-02 17:51:10 +08:00
parent 04f94ad665
commit eebaba8084
44 changed files with 2831 additions and 154 deletions
+6 -1
View File
@@ -10,6 +10,10 @@ function showLoginError(message){
loginError.hidden = false;
}
if(new URLSearchParams(window.location.search).has("expired")){
showLoginError("后台登录已失效,请重新登录。");
}
async function login(){
if(loginPending) return;
const username = userInput.value.trim();
@@ -35,7 +39,8 @@ async function login(){
location.href = "/admin/dashboard";
return;
}
showLoginError(response.status === 401 ? "账号或密码不正确,请重新输入" : "暂时无法登录,请稍后重试");
showLoginError(response.status === 401 ? "账号或密码不正确,请重新输入" :
response.status === 429 ? "登录尝试过多,请 5 分钟后重试" : "暂时无法登录,请稍后重试");
}catch(error){
showLoginError("网络连接失败,请检查网络后重试");
}finally{