调用canvasToTempFilePath报错empty?
发布于 5 年前 作者 wentao 14560 次浏览 来自 问答

onShow:function(){

   wx.canvasToTempFilePath({

     canvasId: ‘canvasIn’,

     success: function (res) {

       var tempFilePath = res.tempFilePath;

       console.log(tempFilePath);

       this.setData({

         imagePath: tempFilePath,

         maskHidden: false

         // canvasHidden:true

       });

     },

     fail: function (res) {

       console.log(res);

     }

   });

 },

我的代码应该没有错,但不知道为什么实现不了

1 回复
回到顶部