画图问题是在绘图区开始画才出现图,nickname还不在上面?
wx.cloud.downloadFile({
fileID:fileID,
success:res1=>{
wx.getImageInfo({
src:res1.tempFilePath,
success (res) {
console.log(res)
that.setData({
scalH:that.data.byclear/375*res.height*that.data.byclear/res.width
})
// console.log('this.data.scalH'+that.data.scalH)
// console.log('this.data.scalH'+that.data.byclear)
// console.log(res1.tempFilePath)
console.log('检查下1')
that.ctx.drawImage(res1.tempFilePath, 0, 0, that.data.byclear, that.data.scalH);
console.log('检查下2')
that.ctx.fillText(that.data.userInfo.nickName, 20, 20)
that.ctx.draw()
}
})
}
})
1 回复
你好,麻烦提供出现问题的具体机型、微信版本号、系统版本号,以及能复现问题的代码片段(https://developers.weixin.qq.com/miniprogram/dev/devtools/minicode.html)