onShareAppMessage: function (res) {
var that = this;
if (res.from == 'button') {
app.console(res.target)
}
return {
title: that.data.info.name,
path: '/pages/food/info?id=' + that.data.info.id,
success: function (res) {
// 转发成功
wx.request({
url: app.buildUrl("/member/share"),
header: app.getRequestHeader(),
method: 'POST',
data: {
url: utils.getCurrentPageUrlWithArgs()
},
success: function (res) {
app.console('成功', res)
}
});
},
fail: function (res) {
// 转发失败
app.console('失败', res)
}
}
}
你是想问回调部分没有生效吗?