Cannot read property 'getContext' of undefined?
发布于 3 年前 作者 ccao 6963 次浏览 来自 官方Issues

在canvas设置了type="2d"是可以正常生成海报,但在调用wx.canvasToTempFilePath,错误信息:canvasToTempFilePath: fail canvas is empty

通过资料查询是在调用wx.canvasToTempFilePath时,canvas不用设置了type=“2d”,于是我将type="2d"去除,在生产海报,出现错误信息:Cannot read property ‘getContext’ of undefined,

代码判断:https://developers.weixin.qq.com/s/MfQEGemg73qd

回到顶部