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
}
}
只支持安卓