移动系统liao
4 天以前 28b358e00c78248a46ed24e27fd9c076e69161a1
Admin.NET/FZCZTB.NET.SYSService/MSM/ZCSMSService.cs
@@ -28,6 +28,7 @@
using Yitter.IdGenerator;
using Lazy.Captcha.Core;
using Furion;
using NewLife;
namespace FZCZTB.NET.SYSService.MSM;
/// <summary>
@@ -45,8 +46,10 @@
          ICaptcha captcha
          )
    {
        _smsOptions = smsOptions.Value;
        _sysCacheService = _sysCacheService;
        _sysCacheService = sysCacheService;
         _captcha = captcha;
    }
@@ -73,7 +76,7 @@
                return Temp.Content+Temp.SignName;
        }
        if (Code == null)
            Oops.Oh("短信内容为空");
            throw Oops.Oh("短信内容为空");
        return Code;
    }
@@ -134,7 +137,7 @@
        if (string.IsNullOrWhiteSpace(verifyCode)) throw Oops.Oh("验证码不存在或已失效,请重新获取!");
        if (verifyCode != input.Code) throw Oops.Oh("验证码错误!");
        _sysCacheService.Remove($"{CacheConst.KeyPhoneVerCode}{input.Phone}");
        return true;
    }
    /// <summary>
@@ -164,13 +167,13 @@
        };
       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>