You need to write it in app.json to activate overShare () before launching it globally.

If you need to set your own forwarding information on a page, you can set isOverShare: true in data

Wx.onapproute (function(res) {let pages = getCurrentPages(), View = pages[pages.length-1], data; if (view) { data = view.data; if (! data.isOverShare) { data.isOverShare = true; View. onShareAppMessage = function() {return {title: 'pages ', path: 'pages'}; }}}Copy the code

})

}