canvasToTempFilePath 安卓无法执行 iOS正常
家中两部安卓 一部魅蓝note5 一部小米MIX2 版本都是微信版本 6.6.7 2.2.1 在canvasPutImageData的 success回调中执行draw 后无法再次执行canvasToTempFilePath 但是IOS上的基础库版本2.1.3 微信版本6.6.7 相同的代码却正常执行 [代码]let windowSize = [代码][代码]this[代码][代码].windowSize[代码][代码] [代码][代码]let bookmark = [代码][代码]this[代码][代码].bookmark[代码][代码] [代码][代码]let mainCtx = [代码][代码]this[代码][代码].mainCtx[代码][代码] [代码][代码]let $store = [代码][代码]this[代码][代码].$store[代码][代码] [代码][代码]let that = [代码][代码]this[代码][代码] [代码][代码]wx.canvasGetImageData({[代码][代码] [代码][代码]canvasId: [代码][代码]'canvas'[代码][代码],[代码][代码] [代码][代码]x: 0,[代码][代码] [代码][代码]y: ((windowSize.windowHeight * 0.9) - bookmark.backgroundImage.style.height) / 2,[代码][代码] [代码][代码]width: windowSize.windowWidth,[代码][代码] [代码][代码]height: bookmark.backgroundImage.style.height,[代码][代码] [代码][代码]success (res) {[代码][代码] [代码][代码]let d = res.data[代码][代码] [代码][代码]let filterData = filters[type](d, {[代码][代码] [代码][代码]height: bookmark.backgroundImage.style.height,[代码][代码] [代码][代码]width: bookmark.backgroundImage.style.width[代码][代码] [代码][代码]})[代码][代码] [代码][代码]wx.canvasPutImageData({[代码][代码] [代码][代码]canvasId: [代码][代码]'canvas'[代码][代码],[代码][代码] [代码][代码]data: filterData,[代码][代码] [代码][代码]x: 0,[代码][代码] [代码][代码]y: ((windowSize.windowHeight * 0.9) - bookmark.backgroundImage.style.height) / 2,[代码][代码] [代码][代码]width: windowSize.windowWidth,[代码][代码] [代码][代码]height: bookmark.backgroundImage.style.height,[代码][代码] [代码][代码]success: (res) => {[代码] [代码][代码] // 安卓上执行到这一步没反应 打印mainCtx也有对象 iOS正常 [代码] [代码][代码]mainCtx.draw([代码][代码]true[代码][代码], () => {[代码][代码] [代码][代码]console.log(wx)[代码][代码] [代码][代码]wx.canvasToTempFilePath({[代码][代码] [代码][代码]canvasId: [代码][代码]'canvas'[代码][代码],[代码][代码] [代码][代码]height: windowSize.windowHeight * 0.9,[代码][代码] [代码][代码]y: 0,[代码][代码] [代码][代码]success: (e) => {[代码][代码] [代码][代码]console.log(e)[代码][代码] [代码][代码]$store.dispatch([代码][代码]'SET_BACKGROUND_IMAGE'[代码][代码], e.tempFilePath)[代码][代码] [代码][代码]},[代码][代码] [代码][代码]fail: (e) => {[代码][代码] [代码][代码]},[代码][代码] [代码][代码]complete: (e) => {[代码][代码] [代码][代码]console.log([代码][代码]'complete'[代码][代码])[代码][代码] [代码][代码]}[代码][代码] [代码][代码]}, that)[代码][代码] [代码][代码]})[代码][代码] [代码][代码]}[代码][代码] [代码][代码]})[代码][代码] [代码][代码]}[代码][代码] [代码][代码]})[代码] 我提交到体验版了 不知管理员能不能直接打开体验版查一下问题