problem description
a user shares a page with parameters to b user in the upper right corner. After clicking on it, b user can receive the parameters, but does not make a data request.
the environmental background of the problems and what methods you have tried
Environment background: Mini Program
try method: the receiving parameter in onshow is to make a wx.request request and I send it successfully
related codes
/ / Please paste the code text below (do not replace the code with pictures)
/**
* --
*/
onShow: function() {
this.getbanner()
this.getinfo()
this.gettopinfo()
if (app.globalData.id) {
this.setData({
id: app.globalData.id
})
this.getbanner()
this.getinfo()
this.gettopinfo()
wx.showToast({
icon: "none",
title: "id=" + app.globalData.id,
mask: "false",
duration: 2000,
success: function(){
console.log("")
}
})
}
},
/**
*
*/
onShareAppMessage: function() {
let shareid = this.data.id;
return {
title: "",
path: `/pages/bulk/bulk?id=${shareid}`,
success(res) {}
};
}
what result do you expect? What is the error message actually seen?
expected result: B can request data through the shared parameters
actually see the error message: the page is just a blank page without any data