收藏
回答

getImageInfo报错 fail download image fail

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);

}

});

})



最后一次编辑于  2018-09-04
回答关注问题邀请回答
收藏

1 个回答