优化数据返回

This commit is contained in:
不做码农
2022-01-11 10:49:38 +08:00
parent 617b34c884
commit b1bd8f12bb
5 changed files with 21 additions and 18 deletions

View File

@@ -74,7 +74,7 @@ namespace ZR.Admin.WebApi.Controllers.System
SysConfig sysConfig = sysConfigService.GetSysConfigByKey("sys.account.captchaOnOff");
if (sysConfig?.ConfigValue != "off" && CacheHelper.Get(loginBody.Uuid) is string str && !str.ToLower().Equals(loginBody.Code.ToLower()))
{
return CustomError(ResultCode.CAPTCHA_ERROR, "验证码错误");
return ToResponse(ResultCode.CAPTCHA_ERROR, "验证码错误");
}
var user = sysLoginService.Login(loginBody, AsyncFactory.RecordLogInfo(httpContextAccessor.HttpContext, "0", "login"));