正在跳转到新版登录页面...

try{ var r=await fetch(window.API+"/api/auth/login",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({phone:phone,password:password})}); var d=await r.json(); if(!r.ok){err.textContent=d.error||"登录失败";err.style.display="block";return;} localStorage.setItem("token",d.token); localStorage.setItem("user",JSON.stringify(d.user)); window.location.href="/"; }catch(e){err.textContent="网络错误,请稍后重试";err.style.display="block";} }