Merge remote-tracking branch 'refs/remotes/origin/abp-dev-10-21' into digital-collectibles

This commit is contained in:
橙子
2024-10-21 20:08:15 +08:00
3 changed files with 12 additions and 4 deletions

View File

@@ -109,6 +109,7 @@ namespace Yi.Framework.AuditLogging.Domain.Entities
public virtual string? Url { get; protected set; } public virtual string? Url { get; protected set; }
[SugarColumn(ColumnDataType = StaticConfig.CodeFirst_BigString)]
public virtual string? Exceptions { get; protected set; } public virtual string? Exceptions { get; protected set; }
public virtual string? Comments { get; protected set; } public virtual string? Comments { get; protected set; }

View File

@@ -3,5 +3,9 @@
public class PhoneCaptchaImageDto public class PhoneCaptchaImageDto
{ {
public string Phone { get; set; } public string Phone { get; set; }
public string? Uuid { get; set; }
public string? Code { get; set; }
} }
} }

View File

@@ -82,12 +82,12 @@ namespace Yi.Framework.Rbac.Application.Services
/// 校验图片登录验证码,无需和账号绑定 /// 校验图片登录验证码,无需和账号绑定
/// </summary> /// </summary>
[AllowAnonymous] [AllowAnonymous]
private void ValidationImageCaptcha(LoginInputVo input) private void ValidationImageCaptcha(string? uuid,string? code )
{ {
if (_rbacOptions.EnableCaptcha) if (_rbacOptions.EnableCaptcha)
{ {
//登录不想要验证码 ,可不校验 //登录不想要验证码 ,可不校验
if (!_captcha.Validate(input.Uuid, input.Code)) if (!_captcha.Validate(uuid, code))
{ {
throw new UserFriendlyException("验证码错误"); throw new UserFriendlyException("验证码错误");
} }
@@ -109,7 +109,7 @@ namespace Yi.Framework.Rbac.Application.Services
} }
//校验验证码 //校验验证码
ValidationImageCaptcha(input); ValidationImageCaptcha(input.Uuid,input.Code);
UserAggregateRoot user = new(); UserAggregateRoot user = new();
//校验 //校验
@@ -209,13 +209,16 @@ namespace Yi.Framework.Rbac.Application.Services
} }
/// <summary> /// <summary>
/// 手机验证码 /// 手机验证码-需通过图形验证码
/// </summary> /// </summary>
/// <returns></returns> /// <returns></returns>
[RemoteService(isEnabled:false)] [RemoteService(isEnabled:false)]
public async Task<object> PostCaptchaPhoneAsync(ValidationPhoneTypeEnum validationPhoneType, public async Task<object> PostCaptchaPhoneAsync(ValidationPhoneTypeEnum validationPhoneType,
PhoneCaptchaImageDto input) PhoneCaptchaImageDto input)
{ {
//验证uuid 和 验证码
ValidationImageCaptcha(input.Uuid,input.Code);
await ValidationPhone(input.Phone); await ValidationPhone(input.Phone);
//注册的手机号验证,是不能已经注册过的 //注册的手机号验证,是不能已经注册过的