diff --git a/Learun.Framework.Ultimate V7/Quanjiang.DigitalScholl.SendSms/Yixintong/YixintongSms.cs b/Learun.Framework.Ultimate V7/Quanjiang.DigitalScholl.SendSms/Yixintong/YixintongSms.cs index 2355fdc31..f6793be28 100644 --- a/Learun.Framework.Ultimate V7/Quanjiang.DigitalScholl.SendSms/Yixintong/YixintongSms.cs +++ b/Learun.Framework.Ultimate V7/Quanjiang.DigitalScholl.SendSms/Yixintong/YixintongSms.cs @@ -16,9 +16,9 @@ namespace Quanjiang.DigitalScholl.SendSms /// public class YixintongSms:ISms { - private static readonly string SpCode = ConfigManager.AppSettings["SpCode"].Value;//企业编号 - private static readonly string LoginName = ConfigManager.AppSettings["LoginName"].Value;//用户名 - private static readonly string Password = ConfigManager.AppSettings["Password"].Value;//接口密钥 + private static string SpCode = ConfigManager.AppSettings["SpCode"].Value;//企业编号 + private static string LoginName = ConfigManager.AppSettings["LoginName"].Value;//用户名 + private static string Password = ConfigManager.AppSettings["Password"].Value;//接口密钥 public async Task<(string code, string randomNum, string message, string errorType)> SendSmsToSingle(string phoneNumber, SmsType st, List sendParams = null) { @@ -26,6 +26,9 @@ namespace Quanjiang.DigitalScholl.SendSms var (templatecode, templateparam, randomNum) = GetSmsTemplateBySmsType(st); try { + if (SpCode.IsEmpty()) SpCode = "320328"; + if (LoginName.IsEmpty()) LoginName = "9c34cbd5462e8034d9b779887c1e8398"; + if (Password.IsEmpty()) Password = "29745012d0575978cd8c93d8d6c62f9d96e6b808eb9ac87845721c7c29b39c8f"; StringBuilder sb=new StringBuilder(); // 按照协议组织 post 请求包体 sb.Append("SpCode="+SpCode); @@ -39,6 +42,7 @@ namespace Quanjiang.DigitalScholl.SendSms //data.Add("ScheduleTime", ""); //data.Add("signCode", ""); //调接口 + Learun.Util.Log.LogHelper.Info(sb.ToString()); string pushresult = Learun.Util.HttpMethods.HttpPost("https://opassapi.infocloud.cc/sms/Api/Send.do", sb.ToString(), Encoding.GetEncoding("utf-8")); //返回体 pushresult = pushresult.Replace("
", "&");