|
@@ -153,6 +153,55 @@ namespace Learun.Application.Web.Controllers |
|
|
return Fail("未授权的appid"); |
|
|
return Fail("未授权的appid"); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/// <summary> |
|
|
|
|
|
/// 获取统一认证用户信息 |
|
|
|
|
|
/// </summary> |
|
|
|
|
|
/// <returns></returns> |
|
|
|
|
|
public ActionResult UserInfo() |
|
|
|
|
|
{ |
|
|
|
|
|
string appid = Request.QueryString["appid"]; |
|
|
|
|
|
string appkey = Request.QueryString["appkey"]; |
|
|
|
|
|
string m = Request.QueryString["m"]; |
|
|
|
|
|
string t = Request.QueryString["t"]; |
|
|
|
|
|
if (string.IsNullOrEmpty(appid)) |
|
|
|
|
|
{ |
|
|
|
|
|
return Fail("参数:appid不能为空"); |
|
|
|
|
|
} |
|
|
|
|
|
if (string.IsNullOrEmpty(appkey)) |
|
|
|
|
|
{ |
|
|
|
|
|
return Fail("参数:appkey不能为空"); |
|
|
|
|
|
} |
|
|
|
|
|
if (string.IsNullOrEmpty(m)) |
|
|
|
|
|
{ |
|
|
|
|
|
return Fail("参数:m不能为空"); |
|
|
|
|
|
} |
|
|
|
|
|
if (string.IsNullOrEmpty(t)) |
|
|
|
|
|
{ |
|
|
|
|
|
return Fail("参数:t不能为空"); |
|
|
|
|
|
} |
|
|
|
|
|
var application = perm_FunctionIBLL.GetPerm_FunctionEntity(appid); |
|
|
|
|
|
if (application != null) |
|
|
|
|
|
{ |
|
|
|
|
|
if (Md5Helper.Encrypt(application.FSecret, 32) == appkey) |
|
|
|
|
|
{ |
|
|
|
|
|
OperatorResult res = OperatorHelper.Instance.IsOnLine(DESEncrypt.Decrypt(t), DESEncrypt.Decrypt(m)); |
|
|
|
|
|
if (res.stateCode == 1) |
|
|
|
|
|
{ |
|
|
|
|
|
return Success(res.userInfo); |
|
|
|
|
|
} |
|
|
|
|
|
else |
|
|
|
|
|
{ |
|
|
|
|
|
return Fail("登录无效"); |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
else |
|
|
|
|
|
{ |
|
|
|
|
|
return Fail("appkey错误"); |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
else |
|
|
|
|
|
return Fail("未授权的appid"); |
|
|
|
|
|
} |
|
|
#endregion |
|
|
#endregion |
|
|
|
|
|
|
|
|
#region 统一身份认证2.0 |
|
|
#region 统一身份认证2.0 |
|
|