优化登录提示

This commit is contained in:
tongfei
2023-12-27 10:27:14 +08:00
parent 12df4e40e4
commit 0aeb75a071
2 changed files with 48 additions and 46 deletions

View File

@@ -317,20 +317,22 @@ namespace WMS.Web.Domain.Services.Public
}
else
{
var errno_text = "登失败:" + jObject["errmsg"];
r.SignedIn = false;
string datajson_sessid = jObject["data"]["uc_sessid"];
//调用单点的退出接口
result = _httpClientHelp.GetHttp(_soaOptions.Url + "/uc/authorize/signin_out", true, cookieValue: datajson_sessid);
jObject = JsonObject.Parse(result);
if (jObject["errno"] == 0)
{
return Result<LoginInDto>.ReFailure("拒绝用户证书试图访问此web站点请与站点管理员联系以建立用户证书权限", 403);
}
else
{
return Result<LoginInDto>.ReFailure(jObject["errmsg"], jObject["errno"]);
}
var errno_text = "登失败:" + jObject["message"];
_logger.LogInformation("登陆失败:" + errno_text);
return Result<LoginInDto>.ReFailure(errno_text, 401);
//r.SignedIn = false;
//string datajson_sessid = jObject["data"]["uc_sessid"];
////调用单点的退出接口
//result = _httpClientHelp.GetHttp(_soaOptions.Url + "/uc/authorize/signin_out", true, cookieValue: datajson_sessid);
//jObject = JsonObject.Parse(result);
//if (jObject["errno"] == 0)
//{
// return Result<LoginInDto>.ReFailure("拒绝用户证书试图访问此web站点请与站点管理员联系以建立用户证书权限", 403);
//}
//else
//{
// return Result<LoginInDto>.ReFailure(jObject["errmsg"], jObject["errno"]);
//}
}
}
catch (Exception ex)