| | |
| | | using Yitter.IdGenerator; |
| | | using Lazy.Captcha.Core; |
| | | using Furion; |
| | | using NewLife; |
| | | |
| | | namespace FZCZTB.NET.SYSService.MSM; |
| | | /// <summary> |
| | |
| | | ICaptcha captcha |
| | | ) |
| | | { |
| | | |
| | | _smsOptions = smsOptions.Value; |
| | | _sysCacheService = _sysCacheService; |
| | | _sysCacheService = sysCacheService; |
| | | |
| | | _captcha = captcha; |
| | | } |
| | | |
| | |
| | | return Temp.Content+Temp.SignName; |
| | | } |
| | | if (Code == null) |
| | | Oops.Oh("短信内容为空"); |
| | | throw Oops.Oh("短信内容为空"); |
| | | return Code; |
| | | } |
| | | |
| | |
| | | if (string.IsNullOrWhiteSpace(verifyCode)) throw Oops.Oh("验证码不存在或已失效,请重新获取!"); |
| | | |
| | | if (verifyCode != input.Code) throw Oops.Oh("验证码错误!"); |
| | | |
| | | _sysCacheService.Remove($"{CacheConst.KeyPhoneVerCode}{input.Phone}"); |
| | | return true; |
| | | } |
| | | /// <summary> |
| | |
| | | }; |
| | | var code= FormartMessage(verifyCode.toString()); |
| | | |
| | | await SendSMSAsync(code, phoneNumber); |
| | | await SendSMSAsync(code, phoneNumber); |
| | | |
| | | _sysCacheService.Set($"{CacheConst.KeyPhoneVerCode}{phoneNumber}", verifyCode, TimeSpan.FromSeconds(_smsOptions.lingKai.VerifyTimeOut)); |
| | | _sysCacheService.Set($"{CacheConst.KeyPhoneVerCode}{phoneNumber}", verifyCode, TimeSpan.FromSeconds(_smsOptions.lingKai.VerifyTimeOut.ToInt())); |
| | | |
| | | |
| | | |
| | | |
| | | await Task.CompletedTask; |
| | | |
| | | } |
| | | |
| | | /// <summary> |