onShareAppMessage(() => {
return {
title: list.value[changeIndex.value].name,
path:
"/pages/index/index,
imageUrl: list.value[changeIndex.value].videoImgUrl,
};
})
onShareTimeline(() => {
return {
title: list.value[changeIndex.value].name,
imageUrl: list.value[changeIndex.value].videoImgUrl,
};
});
- 发布:2023-04-30 03:39
- 更新:2023-07-20 16:55
- 阅读:558
产品分类: uniapp/小程序/微信
PC开发环境操作系统: Windows
PC开发环境操作系统版本号: 专业版11
HBuilderX类型: 正式
HBuilderX版本号: 3.8.1
第三方开发者工具版本号: 1.06.2303220
基础库版本号: 2.31.0
项目创建方式: HBuilderX
示例代码:
操作步骤:
分享代码写在setup里面分享不进入onShareAppMessage和onShareTimeline
分享代码写在setup里面分享不进入onShareAppMessage和onShareTimeline
预期结果:
分享进入onShareAppMessage和onShareTimeline
分享进入onShareAppMessage和onShareTimeline
实际结果:
分享进入onShareAppMessage和onShareTimeline
分享进入onShareAppMessage和onShareTimeline
bug描述:
使用Vue3/Vite版 setup下面使用onShareAppMessage、onShareTimeline不触发,自定义设置分享不生效
package依赖
"@dcloudio/uni-app-plus": "3.0.0-3071120230427001",
"@dcloudio/uni-components": "3.0.0-3071120230427001",
"@dcloudio/uni-h5": "3.0.0-3071120230427001",
"@dcloudio/uni-helper-json": "^1.0.13",
"@dcloudio/uni-mp-alipay": "3.0.0-3071120230427001",
"@dcloudio/uni-mp-baidu": "3.0.0-3071120230427001",
"@dcloudio/uni-mp-jd": "3.0.0-3071120230427001",
"@dcloudio/uni-mp-kuaishou": "3.0.0-3071120230427001",
"@dcloudio/uni-mp-lark": "3.0.0-3071120230427001",
"@dcloudio/uni-mp-qq": "3.0.0-3071120230427001",
"@dcloudio/uni-mp-toutiao": "3.0.0-3071120230427001",
"@dcloudio/uni-mp-weixin": "3.0.0-3071120230427001",
"@dcloudio/uni-quickapp-webview": "3.0.0-3071120230427001",```
2 个回复
5***@qq.com
同问啊,我又两个页面用了onShareAppMessage,有一个页面一直可以触发,另一个死活触发不了,楼主解决了吗?
Diligent_UI - 【插件开发】【专治疑难杂症】【多款插件已上架:https://ext.dcloud.net.cn/publisher?id=193663(微信搜索飘逸科技UI小程序直接体验)】【骗子请绕道】问题咨询请加QQ群:120594820,代表作灵感实用工具小程序
试试不把setup放在script,看看那种情况行不行