wx.canvastotempfilepath定时调用图片路径只执行一次

发布于 6 年前作者 lyu15143 次浏览最后编辑 6 年前来自 ask
  • 需求的场景描述(希望解决的问题)

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

  • 希望提供的能力
2 回复
fang49
fang492 楼4 年前

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           });         }       });