Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

uniapp支持 xhs 平台 onShareChat #5137

Open
WangHaoBZ opened this issue Sep 9, 2024 · 2 comments
Open

uniapp支持 xhs 平台 onShareChat #5137

WangHaoBZ opened this issue Sep 9, 2024 · 2 comments
Assignees
Labels

Comments

@WangHaoBZ
Copy link

WangHaoBZ commented Sep 9, 2024

项目cli:vue2
问题:uniapp编译到小红书后,发现分享聊天onShareChat无法自定义标题和图片,分享出去的是小红书的默认值小程序名称和logo,但分享朋友圈可以的,一样的代码,不一样的结果。
代码:
image

编译结果:
image

期望:希望能够正常的自定义标题和图片

@Otto-J
Copy link
Member

Otto-J commented Sep 26, 2024

你好,这个问题是你问的吗 ask 社区类似问题

感谢反馈,我测试发现 onShareChat 可以正常被触发和打印 log,看你提供的 demo,编译之后的源码有而没有缺失信息。你可以尝试编写原生 demo 小红书小程序是否可以正常展示 sharechat 从而判断是 uniapp 还是小红书的问题。

如果有进展请回复我

@Otto-J Otto-J self-assigned this Sep 26, 2024
@Otto-J Otto-J added the 等待用户反馈 waiting feedback label Sep 26, 2024
@Otto-J
Copy link
Member

Otto-J commented Oct 10, 2024

临时方案
更新 这是一个临时方案,后续会修复。打开小红书编辑器,打开编译产物 dist/dev/mp-xhs/common/vendor.js

你搜索 'onShareAppMessage', 应该可以找到两个结果,两个都追加一个 'onShareChat'

下个 alpha 版本会正式生效

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants