wx.canvastotempfilepath定时调用图片路径只执行一次
发布于 5 年前 作者 lyu 14950 次浏览 来自 问答
  • 需求的场景描述(希望解决的问题)

一分钟调用一次该api,  canvas内容已经改变 ,图片路径不变,图片不变

  • 希望提供的能力
2 回复

wx.canvasToTempFilePath({         x: 0,         y: 0,         width: 96,         height: 96,         canvasId: ‘current_state’,         success: function (res) {           console.log(res.tempFilePath)           that.setData({             readerImg: res.tempFilePath           });         }       });

回到顶部