mirror of
https://gitee.com/fudiwei/DotNetCore.SKIT.FlurlHttpClient.Wechat.git
synced 2025-07-18 22:35:46 +08:00
style: clean code
This commit is contained in:
parent
35633fa519
commit
a5e261a735
@ -40,7 +40,7 @@ namespace SKIT.FlurlHttpClient.Wechat.Api
|
|||||||
{ "offer_id", HttpUtility.UrlEncode(request.MidasOfferId ?? string.Empty) },
|
{ "offer_id", HttpUtility.UrlEncode(request.MidasOfferId ?? string.Empty) },
|
||||||
{ "zone_id", HttpUtility.UrlEncode(request.MidasZoneId ?? string.Empty) },
|
{ "zone_id", HttpUtility.UrlEncode(request.MidasZoneId ?? string.Empty) },
|
||||||
{ "pf", HttpUtility.UrlEncode(request.Platform ?? 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}"))
|
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();
|
XmlDocument xmlDoc = new XmlDocument();
|
||||||
xmlDoc.LoadXml(xml);
|
xmlDoc.LoadXml(xml);
|
||||||
|
|
||||||
XmlNode xmlRoot = xmlDoc.FirstChild;
|
XmlNode? xmlRoot = xmlDoc.FirstChild;
|
||||||
|
if (xmlRoot == null)
|
||||||
|
return false;
|
||||||
|
|
||||||
encryptedMsg = xmlRoot["Encrypt"]?.InnerText?.ToString();
|
encryptedMsg = xmlRoot["Encrypt"]?.InnerText?.ToString();
|
||||||
toUserName = xmlRoot["ToUserName"]?.InnerText?.ToString();
|
toUserName = xmlRoot["ToUserName"]?.InnerText?.ToString();
|
||||||
agentId = xmlRoot["AgentID"]?.InnerText?.ToString();
|
agentId = xmlRoot["AgentID"]?.InnerText?.ToString();
|
||||||
|
Loading…
Reference in New Issue
Block a user