onLoad: function (options) {
var that = this
wx.request({
url: "http://127.0.0.1:8889/api/club/userlist",
data:{
clubnumber:app.globalData.myclub
},
method:"post",
header:{
"content-type":"application/json"
},
success:function(res){
that.setData({
userinfo:res.data
})
}
})
}
onLoad: function (options) {
wx.request({
url: "http://127.0.0.1:8889/api/club/finded",
data:{
name:app.globalData.findClub,
number:app.globalData.findNumber
},
header:{
"content-type":"application/json"
},
method:"post",
success:(res)=>{
const {name,clubclass,admin,member} = res.data
this.setData({
name:name,
clubclass:clubclass,
admin:admin,
member:member
})
}
})
}
both of the above functions are used to listen when the page is loaded, but one does not need to redirect this, and the other needs to redirect this, otherwise it will report an error. Why is this happening
?the first paragraph function is a sub-page that is to be clicked into by tabbar. Is it for this reason? ask the boss to answer ~
.