收藏
回答

新增草稿API图文中插入小程序发布后无小程序图标?

新增草稿API:https://api.weixin.qq.com/cgi-bin/draft/add?access_token=ACCESS_TOKEN

小程序卡片版参照:<mp-miniprogram data-miniprogram-appid="wx123123123" data-miniprogram-path="pages/index/index" data-miniprogram-title="小程序示例" data-miniprogram-imageurl="http://example.com/demo.jpg"></mp-miniprogram>

实际图文内容:

{

"articles": [{

"title": "图文带小程序卡片哈哈",

"author": "哈哈",

"contentType": "IMAGE_TEXT",

"content": "<img class=\"media-wrap image-wrap\" src=\"http://qa-oem-devtest.oss-cn-hangzhou.aliyuncs.com/user-dir-prefix/16762691941823711c32d670e30699a499d9475f79e47.png?Expires=1709049600&OSSAccessKeyId=LTAI4GDr25nznntLEpsdxkW9&Signature=LC2TGqq1tegL7dkpMZKY2ETTT7w%3D\" >上传一个图片试试<mp-miniprogram data-miniprogram-appid=\"wxc7deaa434122136e\" data-miniprogram-path=\"pages/index/index\" data-miniprogram-title=\"哈哈乐\" data-miniprogram-imageurl=\"http://mmbiz.qpic.cn/mmbiz_jpg/n0yaSg6KCISaJaic8udchUZibnAibpFQa3BoONoQ2ZvZQQWYgkUDU3R7vxNabD28cWcExwc2hG6wGtAXa3ZbmX7RQ/0\" data-miniprogram-type=\"card\" ></mp-miniprogram>",

"cover": "http://qa-oem-devtest.oss-cn-hangzhou.aliyuncs.com/user-dir-prefix/1676431580084051d2d86-1a7e-4bec-a18b-d5c695636277%20%282%29.png?Expires=1709049600&OSSAccessKeyId=LTAI4GDr25nznntLEpsdxkW9&Signature=NsWhShiNUe7h3r4TLgz5xVG0bgA%3D",

"digest": "图文加小程序卡片"

}]

}

图文创建并发布成功,但是出现了小程序图标为空的情况:

查看页面源码,发现

src的url异常,而实际上data-weappavatar 后面就是小图标的图片

data-weappavatar="http://mmbiz.qpic.cn/mmbiz_png/p7GiaiclKkaFlOiagBLZic2kOPUaFGYL6EJVB4LHPXcV2HCIfYhickYGZ6UsLgWWyOM4DlBG8bNia7I9zdrLzBLv9Iqg/640?wx_fmt=png&amp;wxfrom=200"

想问下是什么参数传错了吗?



回答关注问题邀请回答
收藏

1 个回答

登录 后发表内容
问题标签