使用 wx.getImageInfo(OBJECT)接口,使用存储文件路径和相对路径在微信6.7.2版本被报错:errMsg:“getImageInfo:fail:file not not found”; 急救
var that = this;
wx.getSystemInfo({
success:function(res){
var width = res.windowWidth
wx.getImageInfo({
src: “…/…/images/index.png”,
success: function (res) {
var height = res.height*width/res.width
console.log(res);
that.setData({
width: width,
height: height
});
},
complete: function(res){
console.log(res);
}
})
}
});