wx.canvasToTempFilePath 调用这个函数,未生成图片
发布于 5 年前 作者 jie71 9423 次浏览 来自 问答

下面这段代码,在android 真机和 模拟器都可以正常执行,在iphone 就会到 fail 的方法, 参数都正确,不知道什么原因造成的, 大神指点一下

wx.canvasToTempFilePath({

         canvasId: id,

         x: x,

         y: y,

         width: width,

         height: height,

         destWidth: width / deviceRadio,

         destHeight: height / deviceRadio,

         success: function success(res) {

console.log("res    " + id + “,” + x + “,” + y + “,” + width + “,” + height + “,” + deviceRadio);

           typeof args[args.length - 1] === ‘function’ && args[args.length - 1](res.tempFilePath);

         },

fail:function(res){

console.log(“res” + res);

console.log(“res    “+id+”,”+x+","+y+"," + width + “,” + height + “,” + deviceRadio);

}

       })

5 回复

你好,这是一个已知问题,我们会尽快进行修复。

已经10天过去了, 这问题还没修复?

为什么canvasToTempFilePath不能主动在onload中调用,一定要放在点击事件中才能生成图片

昨天发布的微信 6.5.23 版本已经修复这个问题, 请更新微信客户端

今天也发现这个问题了,之前都是好的,是不是因为iphone升级造成的啊?请尽快修复啊,在线的项目开始受影响了!

回到顶部