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