小程序分享朋友圈,ios部分手机无效
onShow: function () {
const that = this;
wx.cloud.callFunction({
name: 'getUser',
success: res => {
if(res.result.data.lock==undefined){
that.data.openid = that.data.options.shareid;
}
}
})
wx.showShareMenu({
withShareTicket: true,
menus: ['shareAppMessage', 'shareTimeline']
})
},
/*用户点击右上角分享*/
onShareAppMessage: function () {
return {
title: this.data.title,
path: '/pages/article/index?shareid='+this.data.openid+'&id='+this.data.options.id
}
},
onShareTimeline: function () {
return {
title: this.data.title,
query: 'shareid='+this.data.openid+'&id='+this.data.options.id
}
}