wx.invoke(
"sendChatMessage",
{
msgtype: "news", //消息类型,必填
news: {
link: e.content, //H5消息页面url 必填
title: e.name, //H5消息标题
desc: e.abstract, //H5消息摘要
imgUrl: that.http + e.image, //H5消息封面图片URL
},
},
(res) => {
alert(JSON.stringify(res));
if (res.err_msg == "sendChatMessage:ok") {
//发送成功
alert("成功");
} else {
alert("失败");
}
}
);
你好,可以提供下侧边栏发送h5消息的内容看下
err_msg:"sendChatMessage:fail, invalid param"