Browse Source

统一认证对接 app 添加参数分辨学生/教师

西昌分支
ndbs 6 months ago
parent
commit
d503f43680
1 changed files with 20 additions and 9 deletions
  1. +20
    -9
      Learun.Framework.Ultimate V7/Learun.Application.WebApi/Modules/SSOApi.cs

+ 20
- 9
Learun.Framework.Ultimate V7/Learun.Application.WebApi/Modules/SSOApi.cs View File

@@ -162,7 +162,7 @@ namespace Learun.Application.WebApi.Modules
{ {
url += "?appkey=" + DESEncrypt.Encrypt(code, "bjqjsso"); url += "?appkey=" + DESEncrypt.Encrypt(code, "bjqjsso");
} }
return Success(new{ FInterfaceUrl=url });
return Success(new { FInterfaceUrl = url });
} }
else else
return Fail("appid解析失败,请确认。"); return Fail("appid解析失败,请确认。");
@@ -210,6 +210,15 @@ namespace Learun.Application.WebApi.Modules
functionVisitEntity.PIsLoginSuccess = true; functionVisitEntity.PIsLoginSuccess = true;
functionVisitEntity.PContent = "成功转到统一认证网站:" + perfun.FUrl; functionVisitEntity.PContent = "成功转到统一认证网站:" + perfun.FUrl;
functionVisitIbll.SaveEntity(null, functionVisitEntity); functionVisitIbll.SaveEntity(null, functionVisitEntity);
var Stype = LoginUserInfo.Get().Description;
if (Stype == "学生")
{
Stype = "1";
}
else
{
Stype = "2";
}
return Success(new return Success(new
{ {
FInterfaceUrl = perfun.FInterfaceUrl + "?u=" + FInterfaceUrl = perfun.FInterfaceUrl + "?u=" +
@@ -220,7 +229,9 @@ namespace Learun.Application.WebApi.Modules
DESEncrypt.Encrypt( DESEncrypt.Encrypt(
DESEncrypt.Encrypt(DateTime.Now.ToString("yyyyMMddHHmmss"), secretkey), DESEncrypt.Encrypt(DateTime.Now.ToString("yyyyMMddHHmmss"), secretkey),
publickey) + "&ip=" + publickey) + "&ip=" +
DESEncrypt.Encrypt(DESEncrypt.Encrypt(GetIP(), secretkey), publickey)
DESEncrypt.Encrypt(DESEncrypt.Encrypt(GetIP(), secretkey),
publickey) + "&stype=" + Stype

}); });
} }
else else
@@ -267,12 +278,12 @@ namespace Learun.Application.WebApi.Modules
public Response GetList20(dynamic _) public Response GetList20(dynamic _)
{ {
var userinfo = userInfo; 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); return Success(functionlist);
} }


@@ -289,7 +300,7 @@ namespace Learun.Application.WebApi.Modules
var datatype = perm_FunctionTypeIBLL.GetListByUserId(userInfo.userId); var datatype = perm_FunctionTypeIBLL.GetListByUserId(userInfo.userId);
foreach (var typeEntity in datatype) 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) foreach (var item in datafunction)
{ {
if (item.FIsManagePage == true) if (item.FIsManagePage == true)


Loading…
Cancel
Save