用canvas生成的图片路径,分享时,开发版测试能显示,线上显示不出来

发布于 6 年前作者 wchang11846 次浏览最后编辑 6 年前来自 ask

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 回复
renjie
renjie1 楼6 年前

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

jyin
jyin2 楼4 年前

求助,急