小程序按鈕分享
<button open-type='share'>分享給我的好友</button>
js里面
···
如果分享當(dāng)前頁面,則直接寫個空函數(shù)即可,如果需要在其他頁面分享其他頁面,則需要在里面配置參數(shù)
onShareAppMessage(){
return {
title: 'button',
path: 'page/component/pages/button/button'
}
}
小程序右上角的三個點(diǎn)分享,通過onShareAppMessage設(shè)置,同上
禁用小程序右上角三個點(diǎn)分享, 這個禁用不會影響按鈕的分享
onLoad: function (options) {
wx.hideShareMenu()
}