wx.canvasToTempFilePath最新版微信真机无法使用。
发布于 6 年前 作者 qiangdu 12564 次浏览 来自 问答

开发者工具和安卓都可以使用,ios最新版微信就是不行

canvas:function(){

var that = this

var context = wx.createCanvasContext(‘ass’)

context.drawImage(that.data.downphoto_x, 0, 0, that.data.width, 390)

context.stroke()

context.drawImage(that.data.downimage, 20, 270, 80, 80)

context.stroke()

context.drawImage(’/images/saoma.jpg’, 120, 300, 100, 30)

context.draw()

},

maskss:function(){

var that=this

that.setData({

fenxiao: true

})

},

baocun:function(){

var that=this

wx.canvasToTempFilePath({

canvasId: ‘ass’,

success: function success(res) {

console.log(res)

wx.saveImageToPhotosAlbum({

filePath: res.tempFilePath,

success: function success(res) {

wx.showToast({

title: ‘保存成功’,

duration: 1500,

})

},

complete: function fail(e) {

console.log(e.errMsg);

}

});

},

complete: function complete(e) {

console.log(e.errMsg);

}

});

}

3 回复

不知道是ios最新版微信,还是说ios最新系统: iOS 11.1.2

线上版本哎,突然不行了,被客户打爆电话了

是最新微信

回到顶部