关于函数wx.getImageInfo的src未定义的问题
controlWH: function(obj) {
var that = this;
var tmpUrl = obj.url;
wx.getSystemInfo({
success: function(res) {
var screenW = res.screenWidth;
var screenH = res.screenHeight;
wx.getImageInfo({
src: that.data.tmpUrl,
success: function© {
that.setData({
screenW: res.screenWidth,
screenH: c.height / (c.width / res.screenWidth)
})
}
})
},
})
},
请大神指导,obj是一个数组,到wx.getImageInfo的src就报:
fail parameter error: parameter.src should be String instead of Undefined;
应该如何将tmpUrl赋值给src ?