机型基本都可复现 微信版本为6.7.3 基础库2.4.1 代码片段 wx.canvasToTempFilePath({ canvasId: 'lineGraph', quality: 1, fileType: 'png', success(res) { urlPath = res.tempFilePath; that.setData({ radarImg: urlPath }); wx.getImageInfo({ src: urlPath, success: function (res) { Path = res.path; that.setData({ radarImg: Path }) }, fail: function (res) { console.log(res) } }) }, fail(res){ console.log(res); } }, that)
用wx.getImageInfo来获取http://tmp/wx图片报错- 当前 Bug 的表现(可附上截图) 用wx.getImageInfo来获取 wx.canvasToTempFilePath 生成的 http://tmp/wx图片报接口错误 [图片] -预期效果:可获取转换图片,传给image标签,解决canvas层级高问题 - 复现路径:必现 - 提供一个最简复现 Demo wx.canvasToTempFilePath({ canvasId: 'aaa', quality: 1, fileType: 'png', success(res) { urlPath = res.tempFilePath; that.setData({ radarImg: urlPath }); wx.getImageInfo({ src: urlPath,//服务器返回的图片地址 success: function (res) { Path = res.path; that.setData({ radarImg: Path }) }, fail: function (res) { //失败回调 console.log(res) } }) }, fail(res){ console.log(res); } }, that)
2018-11-30