Browse Source

修改短信接口

娄底高职分支
dao 3 weeks ago
parent
commit
dd0c15d275
1 changed files with 7 additions and 3 deletions
  1. +7
    -3
      Learun.Framework.Ultimate V7/Quanjiang.DigitalScholl.SendSms/Yixintong/YixintongSms.cs

+ 7
- 3
Learun.Framework.Ultimate V7/Quanjiang.DigitalScholl.SendSms/Yixintong/YixintongSms.cs View File

@@ -16,9 +16,9 @@ namespace Quanjiang.DigitalScholl.SendSms
/// </summary>
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<string> 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("<br>", "&");


Loading…
Cancel
Save