微信小程序点击按钮分享指定页面1.在wxml里写所要点击的按钮buttondata-info='{{order}}'open-type="share"hover-class='none'分享/button2.在js页面

1.//gbi指用户所要传递的参数(可以没有参数)//path:用户需要分享的页面

onShareAppMessage:function(res){letgbid=res.target.dataset.info.order_id;return{title:'分享',path:'/pages/imgroup/imgroup?tgid='+gbid,imageUrl:'https://......./img/groupshare.png',//用户分享出去的自定义图片大小为5:4,success:function(res){//转发成功wx.showToast({title:"分享成功",icon:'success',duration:2000})},fail:function(res){//分享失败},}},

TAG标签: 微信小程序小程序分享页面设置小程序分享

http://www.xiaochengxub.com/read-98180.html