wx.getImageInfo真机环境下打开失败
在真机环境下必须打开调试模式,才能返回success,否则返回fail,ios和android都有这个问题,应该如何解决?
var img1 = e.currentTarget.dataset.url
wx.getImageInfo({
src: img1,
success: function (res) {
console.log(res)
wx.navigateTo({
url: ‘…/designdetail/designdetail?img=’ + res.path + ‘&img2=’ + img2+’’,
})
}, fail: function(fl){
console.log(fl)
wx.showToast({
title: ‘获取图片信息失败’,
})
}
})