canvas设置不可见了吧
如何解决canvasToTempFilePath:fail no image?wx.getImageInfo({ src: tempFilePaths[index], success(res1) { ctx.drawImage(tempFilePaths[index], 0, 0, res1.width, res1.height, 0, 0, res1.width, res1.height); console.log(4) ctx.draw(false, function () { index = index + 1;//上传成功的数量,上传成功则加1 wx.canvasToTempFilePath({ width: res1.width, height: res1.height, destWidth: res1.width, destHeight: res1.height, fileType: 'jpg', quality: 0.3, canvasId: 'pressCanvas', success: function success(res) { console.log(5) let images = that.data.images.concat(res.tempFilePath) let status = that.data.status.concat(0) // 限制最多只能留下3张照片 images = images.length <= 9 ? images : images.slice(0, 9) if(images.length>=9){ that.setData({ jia:0 }) } that.setData({ images: images, is_upload: 1, status:status }) that.getCanvasImg(index, tempFilePaths); }, fail: function (e) { console.log(6,e) that.getCanvasImg(index, tempFilePaths); } }); }); }, fail:function(e){ common.errorShowModal() } }) 真机测试就会出问题 上周真机测试还是好好的 代码也没有动 今天测试就出现这个问题 [图片]
2021-02-20同问,我也想用creatInnerAudioContext在锁屏后继续播放声音
小程序锁屏暂停播放wx.createInnerAudioContext() 锁屏后自动暂停播放, 加上后台使用的设置后无效, 开发版和体验版本不生效 在app.json 中添加 "requiredBackgroundModes": [ "audio" ]
2019-01-11