request来的数据用setData赋值时提示undefined?
onLoad:function(){
var that=this;
wx.request({
url: “http://123.com”,
method:“post”,
success:function(res){
var data=res.data;
if(data){
that.setData({ swiperData: data[“advert”] });
}
});
提示不能把undefined赋给swiperData?
Setting data field “swiperData” to undefined is invalid.
黑人问号脸