1.点击按钮实现分享微信好友
//html部分<button class="share_list_button" open-type="share">点击分享</button>//JS部分onLoad() {},onShareAppMessage(res) {// console.log('分享好友',res)return {title: this.brand_name,path: '/pages/index/shopDetails?id='+this.goodsId,imageUrl: this.shareImg}},
2.直接分享
onLoad() {},onShareTimeline(res) {console.log('分享朋友圈',res)return {title:'标题名字',path: '/pages/index/shopDetails?id='+this.goodsId,imageUrl: '图片地址'}},onShareAppMessage(res) {// console.log('分享好友',res)return {title: '标题名字',path: '/pages/index/shopDetails?id='+this.goodsId,imageUrl: '图片地址'}},