Ver código fonte

和田中职
ndbs 3 meses atrás
pai
commit
565af96d4d
2 arquivos alterados com 22 adições e 12 exclusões
  1. +7
    -2
      Learun.Framework.Ultimate V7/Learun.Application.Web/Controllers/HomeController.cs
  2. +15
    -10
      Learun.Framework.Ultimate V7/Learun.Application.WebApi/Modules/SSOApi.cs

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

@@ -87,6 +87,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)
{
@@ -96,11 +101,11 @@ namespace Learun.Application.Web.Controllers
var url = perm_application.FInterfaceUrl;
if (url.Contains("?"))
{
url += "&appkey=" + Md5Helper.Encrypt(perm_application.FSecret, 32) + "&name=" + DESEncrypt.Encrypt(userinfo.realName, perm_application.FSecret, false) + "&no=" + DESEncrypt.Encrypt(userinfo.enCode, perm_application.FSecret, false) + "&no=" + DESEncrypt.Encrypt(userinfo.enCode);
url += "&appkey=" + Md5Helper.Encrypt(perm_application.FSecret, 32) + "&name=" + DESEncrypt.Encrypt(userinfo.realName, perm_application.FSecret, false) + "&type=" + type + "&no=" + DESEncrypt.Encrypt(userinfo.enCode, perm_application.FSecret, false) + "&a=" + DESEncrypt.Encrypt(userinfo.enCode);
}
else
{
url += "?appkey=" + Md5Helper.Encrypt(perm_application.FSecret, 32) + "&name=" + DESEncrypt.Encrypt(userinfo.realName, perm_application.FSecret, false) + "&no=" + DESEncrypt.Encrypt(userinfo.enCode, perm_application.FSecret, false) + "&no=" + DESEncrypt.Encrypt(userinfo.enCode);
url += "?appkey=" + Md5Helper.Encrypt(perm_application.FSecret, 32) + "&name=" + DESEncrypt.Encrypt(userinfo.realName, perm_application.FSecret, false) + "&type=" + type + "&no=" + DESEncrypt.Encrypt(userinfo.enCode, perm_application.FSecret, false) + "&a=" + DESEncrypt.Encrypt(userinfo.enCode);
}
return Redirect(url);
}


+ 15
- 10
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>();
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)
{
@@ -161,13 +166,13 @@ namespace Learun.Application.WebApi.Modules
var url = perm_application.FInterfaceUrl;
if (url.Contains("?"))
{
url += "&appkey=" + Md5Helper.Encrypt("tyrz", 32) + "&name=" + DESEncrypt.Encrypt(userinfo.realName, "tyrz") + "&no=" + DESEncrypt.Encrypt(userinfo.enCode, "tyrz");
url += "&appkey=" + Md5Helper.Encrypt("tyrz", 32) + "&name=" + DESEncrypt.Encrypt(userinfo.realName, "tyrz") + "&type=" + type + "&a=" + DESEncrypt.Encrypt(userinfo.enCode, "tyrz");
}
else
{
url += "?appkey=" + Md5Helper.Encrypt("tyrz", 32) + "&name=" + DESEncrypt.Encrypt(userinfo.realName, "tyrz") + "&no=" + DESEncrypt.Encrypt(userinfo.enCode, "tyrz");
url += "?appkey=" + Md5Helper.Encrypt("tyrz", 32) + "&name=" + DESEncrypt.Encrypt(userinfo.realName, "tyrz") + "&type=" + type + "&a=" + DESEncrypt.Encrypt(userinfo.enCode, "tyrz");
}
return Success(new{ FInterfaceUrl=url });
return Success(new { FInterfaceUrl = url });
}
else
return Fail("appid解析失败,请确认。");
@@ -272,12 +277,12 @@ namespace Learun.Application.WebApi.Modules
public Response GetList20(dynamic _)
{
var userinfo = userInfo;
var functionlist = perm_FunctionIBLL.GetListByUserId(userinfo.userId).Where(m=>m.FIsH5==true).Select(m=>
new
{
m.FName,
m.FId,
});
var functionlist = perm_FunctionIBLL.GetListByUserId(userinfo.userId).Where(m => m.FIsH5 == true).Select(m =>
new
{
m.FName,
m.FId,
});
return Success(functionlist);
}

@@ -294,7 +299,7 @@ namespace Learun.Application.WebApi.Modules
var datatype = perm_FunctionTypeIBLL.GetListByUserId(userInfo.userId);
foreach (var typeEntity in datatype)
{
var datafunction = perm_FunctionIBLL.GetListByFTId(typeEntity.FTId, userInfo.userId).Where(m=>m.FIsH5==true);
var datafunction = perm_FunctionIBLL.GetListByFTId(typeEntity.FTId, userInfo.userId).Where(m => m.FIsH5 == true);
foreach (var item in datafunction)
{
if (item.FIsManagePage == true)


Carregando…
Cancelar
Salvar