要加onShareAppMessage函数,才能转发:
<button bindtap='share' open-type="share">分享</button>
share: function () {//分享,显示当前页面的转发按钮
wx.showShareMenu({
withShareTicket: true
})
},
share:function(){
wx.showShareMenu({
withShareTicket: true
})
}
onShareAppMessage: function (res) {
var that = this;
// 来自页面内转发按钮
if (res.from === 'button') {
console.log(res.target)
}
return {
title: that.data.d.STONE_NAME,
imageUrl: "https://www.lssc-cloud.com/" +TopBanners,
Path:””,
Success:function(res){},
Fail:function(res){}
}
},