onShareAppMessage里面不能加请求
去掉我选中的部分就生效了
/**
* 用户点击右上角分享
*/
onShareAppMessage: function (res) {
if (res.from === 'button') {
// 来自页面内转发按钮
console.log(" 来自页面内转发按钮")
//获取参数id
this.data.idList = this.data.certInfo.id
// api.get
return {
title: '我的分享',
path: '/pages/share/share?id=' + this.data.idList, //这里拼接需要携带的参数
imageUrl: '../../../images/sharePicture.png'
},
this.setData({
hideFlag:true
})
}
},