用canvas生成的图片路径,分享时,开发版测试能显示,线上显示不出来
发布于 5 年前 作者 wchang 11685 次浏览 来自 问答

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)

}

})

},

2 回复

你好,可以调试看看正式版有没有什么错误提示,先在开发版或体验版打开调试,再切到正式版就能看到vConsole

求助,急

回到顶部