From d7917cb35c7992aa02e90ef3b474d712f9e096ce Mon Sep 17 00:00:00 2001 From: dao Date: Thu, 19 Sep 2024 17:11:37 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E7=BB=9F=E4=B8=80=E8=AE=A4?= =?UTF-8?q?=E8=AF=81BUG?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Controllers/LoginController.cs | 8 ++--- .../Views/Login/Default/Index.js | 36 ++++++++++--------- 2 files changed, 24 insertions(+), 20 deletions(-) diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Controllers/LoginController.cs b/Learun.Framework.Ultimate V7/Learun.Application.Web/Controllers/LoginController.cs index e903b2946..0ef30f336 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Controllers/LoginController.cs +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Controllers/LoginController.cs @@ -671,21 +671,21 @@ namespace Learun.Application.Web.Controllers var perm_application = perm_FunctionIBLL.GetPerm_FunctionEntity(appid); if (perm_application != null) { - var userinfo = LoginUserInfo.Get(); + //var userinfo = LoginUserInfo.Get(); //写入当前请求所登录的用户 var type = 0;//1学生 0教师 if (userEntity.F_Description == "学生") { type = 1; } - var url = perm_application.FUrl; + var url = HttpUtility.UrlDecode(Returnurl); if (url.Contains("?")) { - url += "&appkey=" + Md5Helper.Encrypt(Util.DESEncrypt.Decrypt(perm_application.FSecret, ConfigurationManager.AppSettings["SSOPublicSecret"]), 32) + "&name=" + DESEncrypt.Encrypt(userinfo.realName, Util.DESEncrypt.Decrypt(perm_application.FSecret, ConfigurationManager.AppSettings["SSOPublicSecret"]), false) + "&no=" + DESEncrypt.Encrypt(userinfo.IdentityCardNo, Util.DESEncrypt.Decrypt(perm_application.FSecret, ConfigurationManager.AppSettings["SSOPublicSecret"]), false) + "&acc=" + DESEncrypt.Encrypt(userinfo.enCode, Util.DESEncrypt.Decrypt(perm_application.FSecret, ConfigurationManager.AppSettings["SSOPublicSecret"]), false) + "&type=" + type + "&m=" + DESEncrypt.Encrypt(userinfo.loginMark) + "&t=" + DESEncrypt.Encrypt(userinfo.token); + url += "&appkey=" + Md5Helper.Encrypt(Util.DESEncrypt.Decrypt(perm_application.FSecret, ConfigurationManager.AppSettings["SSOPublicSecret"]), 32) + "&name=" + DESEncrypt.Encrypt(userEntity.F_RealName, Util.DESEncrypt.Decrypt(perm_application.FSecret, ConfigurationManager.AppSettings["SSOPublicSecret"]), false) + "&no=" + DESEncrypt.Encrypt(userEntity.F_IdentityCardNo, Util.DESEncrypt.Decrypt(perm_application.FSecret, ConfigurationManager.AppSettings["SSOPublicSecret"]), false) + "&acc=" + DESEncrypt.Encrypt(userEntity.F_EnCode, Util.DESEncrypt.Decrypt(perm_application.FSecret, ConfigurationManager.AppSettings["SSOPublicSecret"]), false) + "&type=" + type + "&m=" + DESEncrypt.Encrypt(loginMark) + "&t=" + DESEncrypt.Encrypt(token); } else { - url += "?appkey=" + Md5Helper.Encrypt(Util.DESEncrypt.Decrypt(perm_application.FSecret, ConfigurationManager.AppSettings["SSOPublicSecret"]), 32) + "&name=" + DESEncrypt.Encrypt(userinfo.realName, Util.DESEncrypt.Decrypt(perm_application.FSecret, ConfigurationManager.AppSettings["SSOPublicSecret"]), false) + "&no=" + DESEncrypt.Encrypt(userinfo.IdentityCardNo, Util.DESEncrypt.Decrypt(perm_application.FSecret, ConfigurationManager.AppSettings["SSOPublicSecret"]), false) + "&acc=" + DESEncrypt.Encrypt(userinfo.enCode, Util.DESEncrypt.Decrypt(perm_application.FSecret, ConfigurationManager.AppSettings["SSOPublicSecret"]), false) + "&type=" + type + "&m=" + DESEncrypt.Encrypt(userinfo.loginMark) + "&t=" + DESEncrypt.Encrypt(userinfo.token); + url += "?appkey=" + Md5Helper.Encrypt(Util.DESEncrypt.Decrypt(perm_application.FSecret, ConfigurationManager.AppSettings["SSOPublicSecret"]), 32) + "&name=" + DESEncrypt.Encrypt(userEntity.F_RealName, Util.DESEncrypt.Decrypt(perm_application.FSecret, ConfigurationManager.AppSettings["SSOPublicSecret"]), false) + "&no=" + DESEncrypt.Encrypt(userEntity.F_IdentityCardNo, Util.DESEncrypt.Decrypt(perm_application.FSecret, ConfigurationManager.AppSettings["SSOPublicSecret"]), false) + "&acc=" + DESEncrypt.Encrypt(userEntity.F_EnCode, Util.DESEncrypt.Decrypt(perm_application.FSecret, ConfigurationManager.AppSettings["SSOPublicSecret"]), false) + "&type=" + type + "&m=" + DESEncrypt.Encrypt(loginMark) + "&t=" + DESEncrypt.Encrypt(token); } Returnurl = url; } diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Views/Login/Default/Index.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Views/Login/Default/Index.js index dcadba5e7..7240b0e71 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Views/Login/Default/Index.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Views/Login/Default/Index.js @@ -183,24 +183,28 @@ //window.location.href = DigitalschoolMisLoginurl + "?F_Account=" + username + "&returnurl=" + Returnurl + "/SSOSystem/DragModelOne"; window.location.href = "/SSOSystem/DragModelOne"; } else { - if (res.data.pwd == true) { - if (res.data.pwdtip == true) { - //window.location.href = DigitalschoolMisLoginurl + "?F_Account=" + username + "&returnurl=" + Returnurl + "/Home/Index?pwdpwdtip=true"; - window.location.href = "/Home/Index?pwdpwdtip=true"; - } else { - //window.location.href = DigitalschoolMisLoginurl + "?F_Account=" + username + "&returnurl=" + Returnurl + "/Home/Index?pwd=true"; - window.location.href = "/Home/Index?pwd=true"; + if (res.data.FInterfaceUrl != '' && res.data.FInterfaceUrl != null && res.data.FInterfaceUrl != undefined) { + window.location.href = res.data.FInterfaceUrl; + } else { + if (res.data.pwd == true) { + if (res.data.pwdtip == true) { + //window.location.href = DigitalschoolMisLoginurl + "?F_Account=" + username + "&returnurl=" + Returnurl + "/Home/Index?pwdpwdtip=true"; + window.location.href = "/Home/Index?pwdpwdtip=true"; + } else { + //window.location.href = DigitalschoolMisLoginurl + "?F_Account=" + username + "&returnurl=" + Returnurl + "/Home/Index?pwd=true"; + window.location.href = "/Home/Index?pwd=true"; + } } - } - else { - if (res.data.pwdtip == true) { - //window.location.href = DigitalschoolMisLoginurl + "?F_Account=" + username + "&returnurl=" + Returnurl + "/Home/Index?pwdtip=true"; - window.location.href = "/Home/Index?pwdtip=true"; - } else { - //window.location.href = DigitalschoolMisLoginurl + "?F_Account=" + username + "&returnurl=" + Returnurl + "/Home/Index"; - window.location.href = "/Home/Index"; + else { + if (res.data.pwdtip == true) { + //window.location.href = DigitalschoolMisLoginurl + "?F_Account=" + username + "&returnurl=" + Returnurl + "/Home/Index?pwdtip=true"; + window.location.href = "/Home/Index?pwdtip=true"; + } else { + //window.location.href = DigitalschoolMisLoginurl + "?F_Account=" + username + "&returnurl=" + Returnurl + "/Home/Index"; + window.location.href = "/Home/Index"; + } + //window.location.href = "/Home/Index"; } - //window.location.href = "/Home/Index"; } } }