Skip to content

Senparc.Weixin.Work.AdvancedAPIs 的方法SendChatNewsMessage调用失败 #3164

@zhou-p

Description

@zhou-p

方法public static WorkJsonResult SendChatNewsMessage(string accessTokenOrAppKey, string chatId, Chat_News news, int safe = 0, int timeOut = Config.TIME_OUT)
,参数Chat_News 中 属性public List

articles { get; set; }这个Article类型使用了Senparc.NeuChar.Entities;的类型,
以下是Senparc.NeuChar.Entities;中的Article类
//
// 摘要:
// 文章
public class Article
{
//
// 摘要:
// 标题
public string Title { get; set; }

//
// 摘要:
//     描述
public string Description { get; set; }

//
// 摘要:
//     点击后跳转的链接
public string Url { get; set; }

//
// 摘要:
//     图文消息的图片链接,支持JPG、PNG格式,较好的效果为大图640*320,小图80*80。如不填,在客户端不显示图片
public string PicUrl { get; set; }

}

企业微信api接口对参数大小写敏感,而这个接口组装的数据中,在Json转化时,没有处理为首字母小写,导致接口调用失败

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions