fix: 修复校验与效验拼写

This commit is contained in:
陈淳
2024-03-07 11:32:49 +08:00
parent 4ce9ee520a
commit a7a794c709
6 changed files with 15 additions and 15 deletions

View File

@@ -64,14 +64,14 @@ namespace Yi.Framework.Rbac.Application.Services
private IAccountManager _accountManager;
private ISqlSugarRepository<MenuEntity> _menuRepository;
/// <summary>
/// 验图片登录验证码,无需和账号绑定
/// 验图片登录验证码,无需和账号绑定
/// </summary>
[AllowAnonymous]
private void ValidationImageCaptcha(LoginInputVo input)
{
if (_rbacOptions.EnableCaptcha)
{
//登录不想要验证码 ,可不
//登录不想要验证码 ,可不
if (!_captcha.Validate(input.Uuid, input.Code))
{
throw new UserFriendlyException("验证码错误");
@@ -94,11 +94,11 @@ namespace Yi.Framework.Rbac.Application.Services
throw new UserFriendlyException("请输入合理数据!");
}
//验验证码
//验验证码
ValidationImageCaptcha(input);
UserEntity user = new();
//
//
await _accountManager.LoginValidationAsync(input.UserName, input.Password, x => user = x);
//获取token
@@ -186,7 +186,7 @@ namespace Yi.Framework.Rbac.Application.Services
}
/// <summary>
/// 验电话验证码,需要与电话号码绑定
/// 验电话验证码,需要与电话号码绑定
/// </summary>
private async Task ValidationPhoneCaptchaAsync(RegisterDto input)
{
@@ -240,10 +240,10 @@ namespace Yi.Framework.Rbac.Application.Services
throw new UserFriendlyException("密码需大于等于6位");
}
//验用户名
//验用户名
ValidateUserName(input);
//验验证码,根据电话号码获取 value比对验证码已经uuid
//验验证码,根据电话号码获取 value比对验证码已经uuid
await ValidationPhoneCaptchaAsync(input);