相关代码, 官方帮忙看一下
const ctx = wx.createCanvasContext(canvasId)
ctx.drawImage(imagePath, 0, 0, imageW, imageH)
ctx.setFontSize(10)
ctx.setFillStyle('white')
ctx.fillText(arr[0], imageW - 100, imageH)
ctx.fillText(arr[1], 0, imageH)
ctx.draw(false, () => {
wx.canvasToTempFilePath({
canvasId: canvasId,
x: 0,
y: 0,
width: imageW,
height: imageH,
quality: 1,
success(res) {
getImgsuccess(res.tempFilePath)
}
})
})
