【修复】修复二维码生成与微信交互判断失效的问题。

This commit is contained in:
jianweie code
2023-04-04 00:00:21 +08:00
parent a112ea2999
commit d4d1e6db4c

View File

@@ -321,17 +321,17 @@ namespace CoreCms.Net.Services
request.LineColor = new WxaGetWxaCodeUnlimitRequest.Types.Color() { Red = 221, Blue = 51, Green = 238 };
var response = await client.ExecuteWxaGetWxaCodeUnlimitAsync(request);
if (response.IsSuccessful() && response.ErrorCode == (int)WeChatReturnCode.ReturnCode.page不正确)
if (!response.IsSuccessful() && response.ErrorCode == (int)WeChatReturnCode.ReturnCode.page不正确)
{
jm.msg = "后台小程序配置的APPID和APPSECRET对应的小程序未发布上线,或者page没有发布无法生成海报";
return jm;
}
else if (response.IsSuccessful() && response.ErrorCode == (int)WeChatReturnCode.ReturnCode.access_token时AppSecret错误或者access_token无效)
else if (!response.IsSuccessful() && response.ErrorCode == (int)WeChatReturnCode.ReturnCode.access_token时AppSecret错误或者access_token无效)
{
jm.msg = "微信小程序access_token已过期无法为你生成海报";
return jm;
}
else if (response.IsSuccessful() && response.ErrorCode > 0)
else if (!response.IsSuccessful() && response.ErrorCode > 0)
{
var enumType = EnumHelper.GetEnumberEntity<WeChatReturnCode.ReturnCode>(response.ErrorCode);
if (enumType != null)