wx.onMenuShareAppMessage({
title: '分享标题', // 分享标题
desc: '--分享描述', // 分享描述
link: `${window.location.href}`, // 分享链接,该链接域名或路径必须与当前页面对应的公众号JS安全域名一致
imgUrl: `${require('../../images/logo.png')}`, // 分享图标
type: 'link', // 分享类型,music、video或link,不填默认为link
dataUrl: '', // 如果type是music或video,则要提供数据链接,默认为空
success: function (e) {
Toast.info('已分享',1)
console.log('e',e);
console.log('window.location.href',window.location.href);
// 用户确认分享后执行的回调函数
},
cancel: function () {
Toast.info('已取消',1)
// 用户取消分享后执行的回调函数
}
})
ios手机可以正确显示,android非自定义显示内容