1.那个页面需要分享功能就在那个页面添加
2.分享到朋友圈需要先开启转发给朋友
onShareAppMessage() { //转发给朋友
return {
title: '博众', //分享给用户的标题
path: 'pages/home/home', //点击分享链接后进入的页面路径
imageUrl: '/static/logo1.png' //分享时显示的图片
};
},
onShareTimeline(){ //分享到朋友圈
return{
title: '博众',
query: 'pages/home/home',
imageUrl: '/static/logo1.png'
}
},