微信版本6.6.1,安卓苹果都是这样;
onShareAppMessage: function (res) {
var that = this;
if (res.from === ‘button’) {
// 来自页面内转发按钮
}
return {
title: that.data.houseTitle,
path: ‘/pages/detail/detail/’ + that.data.houseId,
success: function (res) {
var unionId = wx.getStorageSync(‘unionId’);
var url = app.globalData.setInfo + ‘/api/house/share/count’ + ‘?unionId=’ + unionId
wx.request({
url: url,
method: ‘GET’,
data: { houseId: that.data.houseId },
header: {
‘Content-Type’: ‘application/x-www-form-urlencoded’
},
dataType: ‘json’,
success: function (res) {
}
})
},
fail: function (res) {
// 转发失败
}
}
},