button open-type=“share” 不写onShareAppMessage 能分享 写了onShareAppMessage 不触发
<button open-type=“share” class=‘fenxiang’></button>
//分享
onShareAppMessage: function (res) {
console.log(‘123’);
if (res.from === ‘button’) {
console.log(res.target)
}
return {
title: ‘123123’,
path: ‘/pages/list/play/play?id=’+this.data.playid,
success: function (res) {
},
fail: function (res) {
}
}
},
// 生命周期函数–监听页面显示
onShow: function() {
},
你好,问题未复现。请提供一下出现问题的机型和微信版本,以及能复现问题的简单代码片段(https://developers.weixin.qq.com/miniprogram/dev/devtools/minicode.html)。