From 3459e198e74329c65bd725e3217aaee8d02989fb Mon Sep 17 00:00:00 2001 From: ndbs Date: Fri, 19 Jul 2024 15:35:18 +0800 Subject: [PATCH] =?UTF-8?q?=E7=BB=9F=E4=B8=80=E8=AE=A4=E8=AF=81=E7=99=BB?= =?UTF-8?q?=E5=BD=95=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Controllers/HomeController.cs | 13 +++++++++++-- .../Learun.Application.WebApi/Modules/SSOApi.cs | 11 +++++++++-- 2 files changed, 20 insertions(+), 4 deletions(-) diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Controllers/HomeController.cs b/Learun.Framework.Ultimate V7/Learun.Application.Web/Controllers/HomeController.cs index e71d20ee8..251fd27c9 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Controllers/HomeController.cs +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Controllers/HomeController.cs @@ -84,6 +84,11 @@ namespace Learun.Application.Web.Controllers var userinfo = LoginUserInfo.Get(); if (userinfo != null) { + var type = 0;//1学生 0教师 + if (userinfo.Description == "学生") + { + type = 1; + } var perm_application = perm_FunctionIBLL.GetPerm_FunctionEntity(Request.QueryString["appid"]); if (perm_application != null) { @@ -93,12 +98,16 @@ namespace Learun.Application.Web.Controllers var url = perm_application.FInterfaceUrl; if (url.Contains("?")) { - url += "&appkey=" + DESEncrypt.Encrypt(code, "bjqjsso"); + url += "&appkey=" + Md5Helper.Encrypt("tlmzysso", 32) + "&name=" + DESEncrypt.Encrypt(userinfo.realName, "tlmzysso") + "&no=" + DESEncrypt.Encrypt(userinfo.enCode, "tlmzysso") + "&type=" + type; + //url += "&appkey=" + DESEncrypt.Encrypt(code, "bjqjsso"); } else { - url += "?appkey=" + DESEncrypt.Encrypt(code, "bjqjsso"); + //url += "&appkey=" + DESEncrypt.Encrypt(code, "bjqjsso"); + url += "&appkey=" + Md5Helper.Encrypt("tlmzysso", 32) + "&name=" + DESEncrypt.Encrypt(userinfo.realName, "tlmzysso") + "&no=" + DESEncrypt.Encrypt(userinfo.enCode, "tlmzysso") + "&type=" + type; } + + return Redirect(url); } else diff --git a/Learun.Framework.Ultimate V7/Learun.Application.WebApi/Modules/SSOApi.cs b/Learun.Framework.Ultimate V7/Learun.Application.WebApi/Modules/SSOApi.cs index b258582ec..3848e0018 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.WebApi/Modules/SSOApi.cs +++ b/Learun.Framework.Ultimate V7/Learun.Application.WebApi/Modules/SSOApi.cs @@ -147,6 +147,11 @@ namespace Learun.Application.WebApi.Modules var ssoparam = this.GetReqData(); if (userinfo != null) { + var type = 0;//1学生 0教师 + if (userinfo.Description == "学生") + { + type = 1; + } var perm_application = perm_FunctionIBLL.GetPerm_FunctionEntity(ssoparam.appid); if (perm_application != null) { @@ -156,11 +161,13 @@ namespace Learun.Application.WebApi.Modules var url = perm_application.FInterfaceUrl; if (url.Contains("?")) { - url += "&appkey=" + DESEncrypt.Encrypt(code, "bjqjsso"); + url += "&appkey=" + Md5Helper.Encrypt("tlmzysso", 32) + "&name=" + DESEncrypt.Encrypt(userinfo.realName, "tlmzysso") + "&no=" + DESEncrypt.Encrypt(userinfo.enCode, "tlmzysso") + "&type=" + type; + //url += "&appkey=" + DESEncrypt.Encrypt(code, "bjqjsso"); } else { - url += "?appkey=" + DESEncrypt.Encrypt(code, "bjqjsso"); + //url += "&appkey=" + DESEncrypt.Encrypt(code, "bjqjsso"); + url += "&appkey=" + Md5Helper.Encrypt("tlmzysso", 32) + "&name=" + DESEncrypt.Encrypt(userinfo.realName, "tlmzysso") + "&no=" + DESEncrypt.Encrypt(userinfo.enCode, "tlmzysso") + "&type=" + type; } return Success(new{ FInterfaceUrl=url }); }