小程序无法分享-小程序分享-小程序分享
1.wxml添加标题open-type设为‘share’
buttonopen-type="share"/button2.点击就会触发下边的事件了
//jsonShareAppMessage:function(){//console.log('aaa');letthat=this;return{title:请填写分享标题,//转发后所显示的titlepath:'请填写你要打开的路径',//相对的路径success:(res)={//成功后要做的事情//console.logwx.getShareInfo({shareTicket:res.shareTickets[0],success:(res)={that.setData({isShow:true})},fail:function(res){console.log(res)},complete:function(res){console.log(res)}})},fail:function(res){//分享失败console.log(res)}}},声明:本站所有文章资源内容,如无特殊说明或标注,均为采集网络资源。如若本站内容侵犯了原著者的合法权益,可联系本站删除。

