苹果10.3版本不能调用canvasToTempFilePath
发布于 6 年前 作者 xiuyingxu 14534 次浏览 来自 问答

//调用函数 

shareCard: function () {

    wx.showLoading({

      title: ‘图片生成中’,

    });

    var that = this;

    wx.canvasToTempFilePath({

      canvasId: ‘myCanvas2’,

      success: function (res) {

        wx.hideLoading();

        wx.previewImage({

          current: res.tempFilePath, // 当前显示图片的http链接

          urls: [res.tempFilePath] // 需要预览的图片http链接列表

        })

      }

    })

  },

//以下代码在ios10中没有被执行到,望解答。

wx.canvasToTempFilePath({

      canvasId: ‘myCanvas2’,

      success: function (res) {

        wx.hideLoading();

        wx.previewImage({

          current: res.tempFilePath, // 当前显示图片的http链接

          urls: [res.tempFilePath] // 需要预览的图片http链接列表

        })

回到顶部