page下方法名过长,如果调用wx.request一次,会发起两次请求
//无问题片段
onLoad: function (options) {
var that=this;
that.getUserDi();
},
getUserDi:function(){
var that = this;
api.post({
url:"****",
success:function (res) {
console.log('111');
}
});
}
//有问题片段
onLoad: function (options) {
var that=this;
that.getUserDistribution();
},
getUserDistribution:function(){
var that = this;
api.post({
url:"******",
success:function (res) {
console.log('22222');
}
});
}