Component构造器里如何监测到分享按钮被触发
发布于 6 年前 作者 shiwei 4320 次浏览 来自 问答

onShareAppMessage(){

console.log(‘ss’) //没有被打印

return {

title: `sss`,

path: `/pages/match_details/match_details?id=${this.data.id}`,

imageUrl: this.data.imageUrl

}

}

写在methods里无效

写在methods同级也无效

1 回复

你好,只有页面的 onShareAppMessage 会被触发,页面内的组件不行。

回到顶部