getImageInfo报错 fail download image fail
发布于 5 年前 作者 juanlong 6552 次浏览 来自 问答

getImageInfo报错:fail download image fail,设备信息如下

    1. Accept:"application/json"

    2. SDKVersion:"2.2.4"

    3. X-Requested-With:"XMLHttpRequest"

    4. benchmarkLevel:8

    5. brand:"xiaomi"

    6. content-type:"application/x-www-form-urlencoded"

    7. errMsg:"getSystemInfo:ok"

    8. fontSizeSetting:16

    9. language:"zh_CN"

    10. model:"Redmi Note 4X"

    11. pixelRatio:3

    12. platform:"miniprogrammer"

    13. screenHeight:640

    14. screenWidth:360

    15. statusBarHeight:20

    16. system:"Android 7.0"

    17. version:"6.7.2"

    18. windowHeight:572

    19. windowWidth:360

    20. wxScene:"1012"


代码片段:

//获取图片信息

let getImageInfo = (image, key) => {

return new Promise(function (resolve, reject) {

wx.getImageInfo({

src: image,

success(res) {

resolve({ [key]: { image, …res } });

},

fail(e) {

reject(e, image, key);

}

});

})

1 回复

你好,请提供一下出现问题的机型和微信版本,以及能复现问题的简单代码片段(https://developers.weixin.qq.com/miniprogram/dev/devtools/minicode.html)。

回到顶部