From 9c99793754959703a36f9f1e1caecbc9d516401b Mon Sep 17 00:00:00 2001 From: Janie <109517022+Janie06@users.noreply.github.com> Date: Fri, 10 Mar 2023 16:46:30 +0800 Subject: [PATCH] =?UTF-8?q?Login=20API=20=E6=99=82=E6=95=88=E5=8A=A0?= =?UTF-8?q?=E9=95=B7=E8=87=B330=E5=A4=A9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- EuroTran/EasyBL.WEBAPP/ShowEasy/SystemService.cs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/EuroTran/EasyBL.WEBAPP/ShowEasy/SystemService.cs b/EuroTran/EasyBL.WEBAPP/ShowEasy/SystemService.cs index c8579c0..8ef3531 100644 --- a/EuroTran/EasyBL.WEBAPP/ShowEasy/SystemService.cs +++ b/EuroTran/EasyBL.WEBAPP/ShowEasy/SystemService.cs @@ -164,14 +164,14 @@ namespace EasyBL.WEBAPP.SYS LoginTime = DateTime.Now }; var iExpireTime = 240; - var sExpireTime = Common.GetSystemSetting(db, oUser.OrgID, @"ExpireTime"); + var sExpireTime = Common.GetSystemSetting(db, oUser.OrgID, @"SEexpireTime"); if (!string.IsNullOrEmpty(sExpireTime)) { iExpireTime = int.Parse(sExpireTime); } else { - iExpireTime = int.Parse(Common.GetAppSettings(@"ExpireTime")); + iExpireTime = int.Parse(Common.GetAppSettings(@"SEexpireTime")); } ticket.ExpireTime = DateTime.Now.AddMinutes(iExpireTime); //30天過期 ticket.IsVerify = @"Y"; @@ -199,7 +199,7 @@ namespace EasyBL.WEBAPP.SYS HttpContext.Current.Session.Add(@"userid", ticket.UserID); HttpCookie cookie = new HttpCookie("EURO_COOKIE");//初始化並設置Cookie的名稱 DateTime dt = DateTime.Now; - TimeSpan ts = new TimeSpan(0, 0, 1, 0, 0);//過期時間為1分鐘 + TimeSpan ts = new TimeSpan(30, 0, 0, 0, 0);//過期時間為1分鐘 cookie.Expires = dt.Add(ts);//設置過期時間 cookie.Values.Add("orgid", ticket.OrgID); cookie.Values.Add("userid", ticket.UserID);