canvas 的图显示不出来
canvas 的图为啥显示不了 base64的显示不出来
let promiseImg = new Promise(function (resolve, reject) {
wx.getImageInfo({
src: cover,
success: function (cover) {
resolve(cover.path)
console.log(cover)
}
})
})
promiseImg.then(function (cover) {
that.setData({
cover:cover
})
ctx.drawImage(cover, 0, 0, 320, 170);
})
getImageInfo返回本地的路径也显示不到canvas上如果吧路径放到img上就能显示