重要代码如下:
图片地址 https://oss.qipaistyle.com/3DImage/syst-em718H73870-72K18T71530-09-favorite.png
const query = wx.createSelectorQuery()
query.select('#canvas')
.fields({ node: true, size: true })
.exec((res) => {
const canvas = res[0].node
const ctx = canvas.getContext('2d')
ctx.drawImage(this.img, x, y, manWidth, manHeight)
ctx.restore()
var imageData = ctx.getImageData(0, 0, this.img.width, this.img.height);
ctx.clearRect(0, 0, canvas.width, canvas.height);
ctx.putImageData(imageData, 0, 0);
}
你好,请具体说明问题并提供出现问题的具体机型、微信版本号、系统版本号,以及能复现问题的代码片段(https://developers.weixin.qq.com/miniprogram/dev/devtools/minicode.html)