用canvas生成的图片路径,分享时,开发版测试能显示,线上显示不出来
saveImage: function () {
var that = this
wx.canvasToTempFilePath({
x: 0,
y: 0,
width: that.data.scrollWidth,
height: that.data.y,
destWidth: 500,
destHeight: 400,
canvasId: ‘shareCanvas’,
success: function (res) {
that.setData({
shareImage: res.tempFilePath
})
console.log(“生成名片shareImage:”, that.data.shareImage)
},
fail: function (res) {
console.log(“失败啦res:”, res)
}
})
},