Ver código fonte

统一认证登录优化

塔里木分支
ndbs 4 meses atrás
pai
commit
3459e198e7
2 arquivos alterados com 20 adições e 4 exclusões
  1. +11
    -2
      Learun.Framework.Ultimate V7/Learun.Application.Web/Controllers/HomeController.cs
  2. +9
    -2
      Learun.Framework.Ultimate V7/Learun.Application.WebApi/Modules/SSOApi.cs

+ 11
- 2
Learun.Framework.Ultimate V7/Learun.Application.Web/Controllers/HomeController.cs Ver arquivo

@@ -84,6 +84,11 @@ namespace Learun.Application.Web.Controllers
var userinfo = LoginUserInfo.Get(); var userinfo = LoginUserInfo.Get();
if (userinfo != null) if (userinfo != null)
{ {
var type = 0;//1学生 0教师
if (userinfo.Description == "学生")
{
type = 1;
}
var perm_application = perm_FunctionIBLL.GetPerm_FunctionEntity(Request.QueryString["appid"]); var perm_application = perm_FunctionIBLL.GetPerm_FunctionEntity(Request.QueryString["appid"]);
if (perm_application != null) if (perm_application != null)
{ {
@@ -93,12 +98,16 @@ namespace Learun.Application.Web.Controllers
var url = perm_application.FInterfaceUrl; var url = perm_application.FInterfaceUrl;
if (url.Contains("?")) 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 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); return Redirect(url);
} }
else else


+ 9
- 2
Learun.Framework.Ultimate V7/Learun.Application.WebApi/Modules/SSOApi.cs Ver arquivo

@@ -147,6 +147,11 @@ namespace Learun.Application.WebApi.Modules
var ssoparam = this.GetReqData<SSOParam>(); var ssoparam = this.GetReqData<SSOParam>();
if (userinfo != null) if (userinfo != null)
{ {
var type = 0;//1学生 0教师
if (userinfo.Description == "学生")
{
type = 1;
}
var perm_application = perm_FunctionIBLL.GetPerm_FunctionEntity(ssoparam.appid); var perm_application = perm_FunctionIBLL.GetPerm_FunctionEntity(ssoparam.appid);
if (perm_application != null) if (perm_application != null)
{ {
@@ -156,11 +161,13 @@ namespace Learun.Application.WebApi.Modules
var url = perm_application.FInterfaceUrl; var url = perm_application.FInterfaceUrl;
if (url.Contains("?")) 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 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 }); return Success(new{ FInterfaceUrl=url });
} }


Carregando…
Cancelar
Salvar