mirror of
https://gitee.com/fudiwei/DotNetCore.SKIT.FlurlHttpClient.Wechat.git
synced 2025-09-20 10:38:10 +08:00
style: clean code
This commit is contained in:
@@ -40,7 +40,7 @@ namespace SKIT.FlurlHttpClient.Wechat.Api
|
||||
{ "offer_id", HttpUtility.UrlEncode(request.MidasOfferId ?? string.Empty) },
|
||||
{ "zone_id", HttpUtility.UrlEncode(request.MidasZoneId ?? string.Empty) },
|
||||
{ "pf", HttpUtility.UrlEncode(request.Platform ?? string.Empty) },
|
||||
{ "ts", request.Timestamp.ToString() }
|
||||
{ "ts", request.Timestamp.ToString()! }
|
||||
}
|
||||
);
|
||||
string plainText = string.Join("&", paramMap.Select(e => $"{e.Key}={e.Value}"))
|
||||
|
@@ -275,7 +275,10 @@ namespace SKIT.FlurlHttpClient.Wechat.Work.Utilities
|
||||
XmlDocument xmlDoc = new XmlDocument();
|
||||
xmlDoc.LoadXml(xml);
|
||||
|
||||
XmlNode xmlRoot = xmlDoc.FirstChild;
|
||||
XmlNode? xmlRoot = xmlDoc.FirstChild;
|
||||
if (xmlRoot == null)
|
||||
return false;
|
||||
|
||||
encryptedMsg = xmlRoot["Encrypt"]?.InnerText?.ToString();
|
||||
toUserName = xmlRoot["ToUserName"]?.InnerText?.ToString();
|
||||
agentId = xmlRoot["AgentID"]?.InnerText?.ToString();
|
||||
|
Reference in New Issue
Block a user