This commit is contained in:
2025-10-31 18:35:53 +08:00
parent 67a20340da
commit f34c1213ff
3 changed files with 65 additions and 9 deletions
+7
View File
@@ -78,6 +78,13 @@ namespace FineUIPro.Web
password = Request.Cookies["p"].Value;
}
Session["CurrUser"] = BLL.Funs.DB.Sys_User.FirstOrDefault(x => x.Account == account && x.Password == Funs.EncryptionPassword(password));
// 设置CurrUser的过期时间为24小时
// 通过修改Session的超时时间来实现
if (Context.Session != null && Context.Session.IsNewSession)
{
Context.Session.Timeout = 1440; // 24小时 = 1440分钟
}
}
return (Model.Sys_User)Session["CurrUser"];