小程序onShareAppMessage分享时自定义标题、路径、封面失效?

小程序 文章 2021-03-31 18:22 2214 0 全屏看文

AI助手支持GPT4.0

小程序onShareAppMessage分享时自定义标题、路径、封面失效?Does the custom title, path, and cover of the applet onShareAppMessage fail when sharing?

小程序onShareAppMessage分享时自定义标题、路径、封面失效?

wxxs相关:

wxxl相关:

调试器:可以看到点击按钮已经进入了onShareAppMessage里了,

实际结果:显示的当前分享页面截图,而非在onShareAppMessage中配置的相关信息。

一直怀疑是我的代码写得有问题,知道我用微信开发者工具新建了一个全新的模板项目发现也是不行。

Wxxs related: wxxl related: debugger: you can see that you have entered onshare appmessage by clicking the button. Actual result: the screenshot of the current sharing page is displayed instead of the related information configured in onshare appmessage. I always suspected that there was something wrong with my code. I knew that I had created a new template project with wechat developer tool, and I found that it was no good.

回答:

|G.XIAO|:

代码片段给你一下

Brother斌🎈:

WE!D:这些都加了也还是没有效果
Brother斌🎈:你截图的path好像并不是以/开头的,imageUrl好像并不是正常的png jpg之类的图片路径
Brother斌🎈:对照文档再检查一下,图片换一下看看能不能正常显示
Eric:

图片是否可以访问?

WE!D:图片可以正常访问。

-EOF-

AI助手支持GPT4.0