Cannot read property 'getContext' of undefined?

发布于 5 年前作者 ccao7308 次浏览最后编辑 5 年前来自 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

1 回复
sxue
sxue1 楼3 个月前