context.draw()第一个参数为true的时候,回调里面 wx.canvasToTempFilePath真机不执行;但是在模拟器中一切正常。并且配置了服务器域名
context.draw(true, () =>setTimeout(() =>wx.canvasToTempFilePath({canvasId:'canvas',x: 0,y: 0,width: canvasw,height: canvash,fileType:'png',success:function(res) {vartempFilePath = res.tempFilePath;_this.setData({src: tempFilePath,modalVisible:false})wx.hideToast()_this.triggerEvent('callBackUrl', { code:'success', url: tempFilePath})},}, _this), 100))

麻烦提供出现问题的具体机型、微信版本号、系统版本号,以及能复现问题的代码片段(https://developers.weixin.qq.com/miniprogram/dev/devtools/minicode.html)