using Microsoft.Extensions.Configuration; using MoYu.ConfigurableOptions; namespace SafeCampus.Core.Options; public class TXSmsOptions : IConfigurableOptionsListener { /// /// 腾讯云API密钥 SecretId /// public string SecretId { get; set; } /// /// 腾讯云API密钥 SecretKey /// public string SecretKey { get; set; } /// /// 腾讯云短信 Appid /// public string SmsAppId { get; set; } /// /// 腾讯云短信 签名 /// public string SmsSn { get; set; } /// /// 验证码模板id /// public string VerificationCodeId { get; set; } public void PostConfigure(TXSmsOptions options, IConfiguration configuration) { } public void OnListener(TXSmsOptions options, IConfiguration configuration) { SecretId=options.SecretId; SecretKey=options.SecretKey; SmsAppId=options.SmsAppId; SmsSn=options.SmsSn; VerificationCodeId = options.VerificationCodeId; } }