通過判斷res.from的值是不是button來判斷是按鈕分享還是右上角轉(zhuǎn)發(fā)
onShareAppMessage: function (res) {
//判斷是否通過點(diǎn)擊按鈕分享
if(res.from!='button')
{
return {
title: this.data.shareData.title || this.data.userInfo.nickName + '的分享',
path:'pages/index/index'
}
}
})