库版本更新后wx.canvasToTempFilePath()函数调用不成功,怎么办啊!是API的问题吗?
canvas的wsxx代码如下:
<canvas canvas-id=“combineCanvas” style=“height:{{pictureHeight}}px;width:{{windowWidth}}px;position:absolute;z-index =-1;”
wx.canvasToTempFilePath()函数调用如下:
wx.canvasToTempFilePath({
canvasId: ‘combineCanvas’,
success: function (res) {
var result = res.tempFilePath
/*
wx.saveImageToPhotosAlbum({
filePath: res.tempFilePath,
})*/
var endorid = that.data.endorid
wx.redirectTo({
url: ‘/pages/addStriker/addStriker?imageUrl=’ + result+’&endorid=’ + endorid,
})
}
})