Click on the friend in the picture to help you cut the knife and share it with your friend. No matter whether you have selected a friend or not, jump to the corresponding details page
onShareAppMessage: function (res) {
if (res.from == "menu") {
return {
title: "",
path: ""
}
}
const that = this;
if (res.target.id == "2") {//
wx.navigateTo({
url: "/pages/bargain/bargaindetails/bargaindetails?shelveId=" + that.selectObj.shelveId + "&geoId=" + that.data.geoId
})
}
var productName = ""
var imageUrl = ""
var shelveId = 0
var detailId = 0
if (JSON.stringify(res.target.dataset) != "{}") {
productName = res.target.dataset.proname
imageUrl = res.target.dataset.icon
shelveId = res.target.dataset.shelveid
detailId = res.target.dataset.detailid
var app = getApp();
app.aldstat.sendEvent("-", {
"": shelveId,
"": productName
});
} else if (JSON.stringify(this.selectObj) != undefined || JSON.stringify(this.selectObj) != null) {
productName = that.selectObj.productName
imageUrl = that.selectObj.icon
shelveId = that.selectObj.shelveId
detailId = that.selectObj.shareId
this.selectObj = null
}
return {
title: "",
path: "",
imageUrl: imageUrl,
success: function (res) {
var app = getApp();
app.aldstat.sendEvent("--", {
"": shelveId,
"": productName
});
}
}
},