html52.com
我爱小程序-开发者交流社区

Cannot read property 'getContext' of undefined?

在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

网友回复

Mr.Zhao:

Mr.Zhao:

评论 抢沙发

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址

真正的个人免签约支付接口

云免签H5支付