wx.downloadFile()与wx.getImageInfo()获取不到返回值
wx.downloadFile({
url: 'https://dz-b2be19.tcb.qcloud.la/my-photo.png?sign=q-sign-algorithm%3Dsha1%26q-ak%3DAKIDXxCFD27Lo6HVecr4WpwseIl3DCzZJJQM%26q-sign-time%3D1534741250%3B1534742150%26q-key-time%3D1534741250%3B1534742150%26q-header-list%3D%26q-url-param-list%3D%26q-signature%3D3e19d2c9323ff4cd088e8360571c0b8856bc43b0', /
success: function (res) {
console.log(res.tempFilePath)
if (res.statusCode === 200) {
wx.playVoice({
filePath: res.tempFilePath
})
wx.getImageInfo({
src: 'https://dz-b2be19.tcb.qcloud.la/my-photo.png?sign=q-sign-algorithm%3Dsha1%26q-ak%3DAKIDXxCFD27Lo6HVecr4WpwseIl3DCzZJJQM%26q-sign-time%3D1534741250%3B1534742150%26q-key-time%3D1534741250%3B1534742150%26q-header-list%3D%26q-url-param-list%3D%26q-signature%3D3e19d2c9323ff4cd088e8360571c0b8856bc43b0',
success: function (res3) {
console.log("输出图片信息")
console.log(res3.width)
console.log(res3.height)
},
fail: function (res) {
console.log(res)
}
})
开发工具输出
downloadFile:undefined
getImageInfo:{errMsg: "getImageInfo:fail file not found"}
phone6 输出
downloadFile:正常返回
getImageInfo:{errMsg: "getImageInfo:fail image not found"}
三星s8输出
downloadFile:正常返回
getImageInfo: -1 -1
你好,请提供一下能复现问题的简单代码片段(https://developers.weixin.qq.com/miniprogram/dev/devtools/minicode.html)。
wx.downloadFile({
url: 'https://dz-b2be19.tcb.qcloud.la/my-photo.png?sign=q-sign-algorithm%3Dsha1%26q-ak%3DAKIDXxCFD27Lo6HVecr4WpwseIl3DCzZJJQM%26q-sign-time%3D1534741250%3B1534742150%26q-key-time%3D1534741250%3B1534742150%26q-header-list%3D%26q-url-param-list%3D%26q-signature%3D3e19d2c9323ff4cd088e8360571c0b8856bc43b0', /
success: function (res) {
console.log(res.tempFilePath)
if (res.statusCode === 200) {
wx.playVoice({
filePath: res.tempFilePath
})
wx.getImageInfo({
src: 'https://dz-b2be19.tcb.qcloud.la/my-photo.png?sign=q-sign-algorithm%3Dsha1%26q-ak%3DAKIDXxCFD27Lo6HVecr4WpwseIl3DCzZJJQM%26q-sign-time%3D1534741250%3B1534742150%26q-key-time%3D1534741250%3B1534742150%26q-header-list%3D%26q-url-param-list%3D%26q-signature%3D3e19d2c9323ff4cd088e8360571c0b8856bc43b0',
success: function (res3) {
console.log("输出图片信息")
console.log(res3.width)
console.log(res3.height)
},
fail: function (res) {
console.log(res)
}
})
你好,请使用代码片段功能提供可复现问题的代码片段:https://developers.weixin.qq.com/miniprogram/dev/devtools/minicode.html
touristappid
wechatide://minicode/jzfG5PmD7e1l
你好,你所提供的代码片段无法正常运行哦,