|
|
@@ -1,13 +1,6 @@ |
|
|
|
using Learun.Application.AppMagager; |
|
|
|
using Learun.Util; |
|
|
|
using Learun.Util; |
|
|
|
using Nancy; |
|
|
|
using System.Collections.Generic; |
|
|
|
using System.Linq; |
|
|
|
using Learun.Application.Base.SystemModule; |
|
|
|
using Learun.Application.TwoDevelopment.LR_Desktop; |
|
|
|
using System.Text; |
|
|
|
using System.Data; |
|
|
|
using Learun.Application.OA; |
|
|
|
using System.Configuration; |
|
|
|
using Learun.Application.TwoDevelopment.Permission; |
|
|
|
using System; |
|
|
@@ -143,34 +136,53 @@ namespace Learun.Application.WebApi.Modules |
|
|
|
|
|
|
|
public Response GoToApplication(dynamic _) |
|
|
|
{ |
|
|
|
var userinfo = userInfo; |
|
|
|
var ssoparam = this.GetReqData<SSOParam>(); |
|
|
|
if (userinfo != null) |
|
|
|
try |
|
|
|
{ |
|
|
|
var perm_application = perm_FunctionIBLL.GetPerm_FunctionEntity(ssoparam.appid); |
|
|
|
if (perm_application != null) |
|
|
|
var userinfo = userInfo; |
|
|
|
|
|
|
|
var ssoparam = this.GetReqData<SSOParam>(); |
|
|
|
if (userinfo != null) |
|
|
|
{ |
|
|
|
//写入当前请求所登录的用户 |
|
|
|
var code = Util.CommonHelper.RndNum(9); |
|
|
|
cache.Write(code, userinfo.account, TimeSpan.FromMinutes(10)); |
|
|
|
var url = perm_application.FInterfaceUrl; |
|
|
|
if (url.Contains("?")) |
|
|
|
var Stype = userinfo.Description; |
|
|
|
if (Stype == "学生") |
|
|
|
{ |
|
|
|
url += "&appkey=" + DESEncrypt.Encrypt(code, "bjqjsso"); |
|
|
|
Stype = "1"; |
|
|
|
} |
|
|
|
else |
|
|
|
{ |
|
|
|
url += "?appkey=" + DESEncrypt.Encrypt(code, "bjqjsso"); |
|
|
|
Stype = "2"; |
|
|
|
} |
|
|
|
return Success(new { FInterfaceUrl = url }); |
|
|
|
var perm_application = perm_FunctionIBLL.GetPerm_FunctionEntity(ssoparam.appid); |
|
|
|
if (perm_application != null) |
|
|
|
{ |
|
|
|
//写入当前请求所登录的用户 |
|
|
|
var code = Util.CommonHelper.RndNum(9); |
|
|
|
cache.Write(code, userinfo.account, TimeSpan.FromMinutes(10)); |
|
|
|
var url = perm_application.FInterfaceUrl; |
|
|
|
if (url.Contains("?")) |
|
|
|
{ |
|
|
|
url += "&appkey=" + DESEncrypt.Encrypt(code, "bjqjsso") + "&stype=" + Stype; |
|
|
|
} |
|
|
|
else |
|
|
|
{ |
|
|
|
url += "?appkey=" + DESEncrypt.Encrypt(code, "bjqjsso") + "&stype=" + Stype; |
|
|
|
} |
|
|
|
return Success(new { FInterfaceUrl = url }); |
|
|
|
} |
|
|
|
else |
|
|
|
return Fail("appid解析失败,请确认。"); |
|
|
|
} |
|
|
|
else |
|
|
|
return Fail("appid解析失败,请确认。"); |
|
|
|
{ |
|
|
|
return Fail("用户信息解析失败,请确认。"); |
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
else |
|
|
|
catch (Exception) |
|
|
|
{ |
|
|
|
return Fail("用户信息解析失败,请确认。"); |
|
|
|
return Fail("参数错误。。。"); |
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
public Response GoTo(dynamic _) |
|
|
|