feat:完善注册功能

This commit is contained in:
陈淳
2023-03-30 11:49:39 +08:00
parent bcf7802f94
commit 6b2ef71296
8 changed files with 121 additions and 51 deletions

View File

@@ -15,11 +15,15 @@ namespace Yi.Framework.Sms.Aliyun
public Client AliyunClient { get; set; }
private ILogger<SmsAliyunManager> _logger;
private SmsAliyunOptions Options { get; set; }
public SmsAliyunManager(ILogger<SmsAliyunManager> logger,IOptions<SmsAliyunOptions> options)
public SmsAliyunManager(ILogger<SmsAliyunManager> logger, IOptions<SmsAliyunOptions> options)
{
_logger = logger;
AliyunClient = CreateClient(Options.AccessKeyId, Options.AccessKeySecret);
Options = options.Value;
if (Options.EnableFeature)
{
_logger = logger;
AliyunClient = CreateClient(Options.AccessKeyId, Options.AccessKeySecret);
}
}
private static Client CreateClient(string accessKeyId, string accessKeySecret)

View File

@@ -12,5 +12,7 @@ namespace Yi.Framework.Sms.Aliyun
public string AccessKeySecret { get; set; }
public string SignName { get; set; }
public bool EnableFeature { get; set; } = true;
}
}