|
@ -163,15 +163,15 @@ namespace EasyBL.WEBAPP.SYS |
|
|
// LoginIp = i_crm.ClientIP,
|
|
|
// LoginIp = i_crm.ClientIP,
|
|
|
LoginTime = DateTime.Now |
|
|
LoginTime = DateTime.Now |
|
|
}; |
|
|
}; |
|
|
var iExpireTime = 43200; |
|
|
|
|
|
var sExpireTime = Common.GetSystemSetting(db, oUser.OrgID, @"ExpireTime"); |
|
|
|
|
|
|
|
|
var iExpireTime = 240; |
|
|
|
|
|
var sExpireTime = Common.GetSystemSetting(db, oUser.OrgID, @"SEexpireTime"); |
|
|
if (!string.IsNullOrEmpty(sExpireTime)) |
|
|
if (!string.IsNullOrEmpty(sExpireTime)) |
|
|
{ |
|
|
{ |
|
|
iExpireTime = int.Parse(sExpireTime); |
|
|
iExpireTime = int.Parse(sExpireTime); |
|
|
} |
|
|
} |
|
|
else |
|
|
else |
|
|
{ |
|
|
{ |
|
|
iExpireTime = int.Parse(Common.GetAppSettings(@"ExpireTime")); |
|
|
|
|
|
|
|
|
iExpireTime = int.Parse(Common.GetAppSettings(@"SEexpireTime")); |
|
|
} |
|
|
} |
|
|
ticket.ExpireTime = DateTime.Now.AddMinutes(iExpireTime); //30天過期
|
|
|
ticket.ExpireTime = DateTime.Now.AddMinutes(iExpireTime); //30天過期
|
|
|
ticket.IsVerify = @"Y"; |
|
|
ticket.IsVerify = @"Y"; |
|
@ -208,7 +208,7 @@ namespace EasyBL.WEBAPP.SYS |
|
|
HttpContext.Current.Session.Add(@"userid", ticket.UserID); |
|
|
HttpContext.Current.Session.Add(@"userid", ticket.UserID); |
|
|
HttpCookie cookie = new HttpCookie("EURO_COOKIE");//初始化並設置Cookie的名稱
|
|
|
HttpCookie cookie = new HttpCookie("EURO_COOKIE");//初始化並設置Cookie的名稱
|
|
|
DateTime dt = DateTime.Now; |
|
|
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.Expires = dt.Add(ts);//設置過期時間
|
|
|
cookie.Values.Add("orgid", ticket.OrgID); |
|
|
cookie.Values.Add("orgid", ticket.OrgID); |
|
|
cookie.Values.Add("userid", ticket.UserID); |
|
|
cookie.Values.Add("userid", ticket.UserID); |
|
|