收藏
回答

wx.canvasToTempFilePath 调用这个函数,未生成图片


下面这段代码,在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);

}

       })


最后一次编辑于  2017-11-20
回答关注问题邀请回答
收藏

5 个回答

  • 小程序技术专员-拉风
    小程序技术专员-拉风
    2017-11-30

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

    2017-11-30
    有用
    回复
  • 小程序技术专员-拉风
    小程序技术专员-拉风
    2017-11-20

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

    2017-11-20
    有用
    回复
  • 彼岸花开
    彼岸花开
    2017-12-14

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

    2017-12-14
    有用
    回复
  • 某人
    某人
    2017-11-30

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


    2017-11-30
    有用
    回复
  • nova
    nova
    2017-11-20

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

    2017-11-20
    有用
    回复
登录 后发表内容