Ejemplo n.º 1
0
        public async Task <string> CheckCodeAsync(CheckCodeCmd cmd, CodeType type, string clientIp)
        {
            if (cmd.CheckCode.IsNullOrWhiteSpace())
            {
                return("验证码不可为空");
            }
            if (!await _verificationCodeService.ExistAvailableCode(cmd.MemberId, cmd.CheckCode, type).ConfigureAwait(false))
            {
                return("验证码错误");
            }
            var verificationCode = await _verificationCodeService.GetAvailableCode(cmd.MemberId, cmd.CheckCode, type).ConfigureAwait(false);

            return(null);
        }
Ejemplo n.º 2
0
 public async Task <string> CheckAuthenticationCodeAsync(CheckCodeCmd cmd, string clientIp)
 {
     return(await CheckCodeAsync(cmd, CodeType.All, clientIp).ConfigureAwait(false));
 }