Browse Source

无ui登录接口

西昌缴费二期
liangkun 3 years ago
parent
commit
50478506dc
1 changed files with 48 additions and 0 deletions
  1. +48
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Controllers/LoginController.cs

+ 48
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Controllers/LoginController.cs View File

@@ -739,6 +739,54 @@ namespace Learun.Application.Web.Controllers
}
}

[HttpGet]
public ActionResult CheckLoginForSSOBC(string u)
{
try
{
string uid = Request.QueryString["u"];
if (!string.IsNullOrEmpty(uid))
{
string username = uid;
string password = "www.qj.com";
UserEntity userEntity = userBll.CheckLogin(username, Md5Helper.Encrypt(password, 32));

LogEntity logEntity = new LogEntity();
logEntity.F_CategoryId = 1;
logEntity.F_OperateTypeId = ((int)OperationType.Login).ToString();
logEntity.F_OperateType = EnumAttribute.GetDescription(OperationType.Login);
logEntity.F_OperateAccount = username + "(" + userEntity.F_RealName + ")";
logEntity.F_OperateUserId = !string.IsNullOrEmpty(userEntity.F_UserId) ? userEntity.F_UserId : username;
logEntity.F_Module = "接口登录";
logEntity.F_Description = "PC端";
if (!userEntity.LoginOk)//登录失败
{
//写入日志
logEntity.F_ExecuteResult = 0;
logEntity.F_ExecuteResultJson = "接口登录失败:" + userEntity.LoginMsg;
logEntity.WriteLog();
return Fail(userEntity.LoginMsg);
}
else
{
//OperatorHelper.Instance.AddLoginUser(userEntity.F_Account, "Learun_ADMS_6.1_PC", null);//写入缓存信息
//写入日志
logEntity.F_ExecuteResult = 1;
logEntity.F_ExecuteResultJson = "无ui接口登录成功";
logEntity.WriteLog();
return Success("login success");
}
}
else
{
return Fail("参数错误");
}
}
catch (Exception e)
{
return Fail("参数错误");
}
}
#endregion

#region 微信登录


Loading…
Cancel
Save