fix: use /rbac/user/up_login.dspy (works), userpassword_login.ui returns 404

This commit is contained in:
yumoqing 2026-08-11 17:28:15 +08:00
parent 6b46aed680
commit 7fc08a7afa

View File

@ -155,7 +155,7 @@ async function doLogin(){
if(!u||!p){document.getElementById('login-msg').textContent='请输入用户名和密码';return}
var fd=new FormData();fd.append('username',u);fd.append('passwd',p);
try{
var r=await fetch('/rbac/userpassword_login.dspy',{method:'POST',body:fd});
var r=await fetch('/rbac/user/up_login.dspy',{method:'POST',body:fd});
var d=await r.json();
if(d.status==='ok'){closeLogin();checkLogin();document.getElementById('login-msg').textContent=''}
else document.getElementById('login-msg').textContent=d.message||'登录失败';