Solution:
onShareAppMessage is a page method, Component which is not provided, the solution is to write the Share button in the assembly, the referenced page write method of sharing events in the original
assembly .wxml
<button class="sharebutton" open-type="share" bindtap="share"></button >
The original reference page .js
onShareAppMessage: function (res) {
return {
title: '我们陪你一起到家!',
path: "/pages/report-await/fouryearh5share,
imageUrl: 'https://lbdj.oss-cn-beijing.aliyuncs.com/pc/img/activity/supplement/share.png',
}
}