We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
微信小程序
https://github.com/BinZhiZhu/taro-wx-plugin 小程序基础库: 2.19.2 使用框架: React
taro init然后选择wxplugin模板,微信开发者工具打开模板,在插件模板页面增加自定义分享代码片段:
onShareAppMessage(res) { console.log('onShareAppMessage',res) return { title: '享受会员福利,解锁品质生活', path: '/pages/index/index', imageUrl: '' } }
插件页面可自定义分享
没有触发onShareAppMessage
➜ mini-plugin git:(master) ✗ taro info 👽 Taro v3.3.3 Taro CLI 3.3.3 environment info: System: OS: macOS 11.2.3 Shell: 5.8 - /bin/zsh Binaries: Node: 14.17.3 - /usr/local/bin/node Yarn: 1.15.2 - /usr/local/bin/yarn npm: 6.14.13 - /usr/local/bin/npm npmPackages: @tarojs/components: 3.3.3 => 3.3.3 @tarojs/mini-runner: 3.3.3 => 3.3.3 @tarojs/react: 3.3.3 => 3.3.3 @tarojs/runtime: 3.3.3 => 3.3.3 @tarojs/taro: 3.3.3 => 3.3.3 @tarojs/webpack-runner: 3.3.3 => 3.3.3 babel-preset-taro: 3.3.3 => 3.3.3 eslint-config-taro: 3.3.3 => 3.3.3 react: ^17.0.0 => 17.0.2 npmGlobalPackages: typescript: 3.5.2
我看到issue中,最新的版本修复了一些问题(例如文件修改报错问题),所以我直接升级到了3.3.3版本,Taro3.3.3开发小程序插件页面打印Taro. Current.page缺失页面处理函数:onShareAppMessage,看下方截图:
我用原生的微信小程序插件模板代码,插件页面打印this对象是存在onShareAppMessage且可支持自定义分享:
The text was updated successfully, but these errors were encountered:
对比来看,除了onShareAppMessage,其他一些页面函数也表现不一致,这个是因为Taro实例没同步好问题吗?印象中好像上一两个版本才修复,3.3.1中Taro实例还是undefined的
Sorry, something went wrong.
@luckyadam @Chen-jj 帮忙看看
大佬,这个问题可确认是否是bug么?我们有个项目用Taro3开发小程序插件,还专门是搞分享的,准备上线了,现在直接卡在这边了,做到最后才发现分享有问题 = =,现在有点进退两难,能否告知一下具体啥情况,如果是bug要啥时可以修复发布,我们好评估一下是否选择其他方案了 😢 @luckyadam
fix(react): 修复编译小程序插件不能触发分享的问题,fix #10105
9504725
7c2ce64
luckyadam
Successfully merging a pull request may close this issue.
相关平台
微信小程序
复现仓库
https://github.com/BinZhiZhu/taro-wx-plugin
小程序基础库: 2.19.2
使用框架: React
复现步骤
taro init然后选择wxplugin模板,微信开发者工具打开模板,在插件模板页面增加自定义分享代码片段:
期望结果
插件页面可自定义分享
实际结果
没有触发onShareAppMessage
环境信息
补充信息
我看到issue中,最新的版本修复了一些问题(例如文件修改报错问题),所以我直接升级到了3.3.3版本,Taro3.3.3开发小程序插件页面打印Taro. Current.page缺失页面处理函数:onShareAppMessage,看下方截图:
我用原生的微信小程序插件模板代码,插件页面打印this对象是存在onShareAppMessage且可支持自定义分享:
The text was updated successfully, but these errors were encountered: