wx.chooseImage
wx.chooseImage({
count: 1, // 默认9
sizeType: [‘original’, ‘compressed’], // 可以指定是原图还是压缩图,默认二者都有
sourceType: [‘album’, ‘camera’], // 可以指定来源是相册还是相机,默认二者都有
success(res) {
const src = res.tempFilePaths[0];
debugger;
that.setData({
imgSrc: src
})
}
})
工具上正常,真机上返回的src是这种格式(‘
wxfile://tmp_0e8dab9aa965a22b0bf9993fea89859fe4b264f291743cc0.png
’),不是http格式读不出来了是怎么回事?
