收藏
回答

wx.canvasToTempFilePath最新版微信真机无法使用。

问题模块
API和组件

开发者工具和安卓都可以使用,ios最新版微信就是不行



canvas:function(){

var that = this

var context = wx.createCanvasContext('ass')

context.drawImage(that.data.downphoto_x, 0, 0, that.data.width, 390)

context.stroke()

context.drawImage(that.data.downimage, 20, 270, 80, 80)

context.stroke()

context.drawImage('/images/saoma.jpg', 120, 300, 100, 30)

context.draw()

},

maskss:function(){

var that=this

that.setData({

fenxiao: true

})

},

baocun:function(){

var that=this

wx.canvasToTempFilePath({

canvasId: 'ass',

success: function success(res) {

console.log(res)

wx.saveImageToPhotosAlbum({

filePath: res.tempFilePath,

success: function success(res) {

wx.showToast({

title: '保存成功',

duration: 1500,


})

},

complete: function fail(e) {

console.log(e.errMsg);

}

});

},

complete: function complete(e) {

console.log(e.errMsg);

}

});

}



最后一次编辑于  2017-11-19  (未经腾讯允许,不得转载)
邀请回答
复制链接收藏投诉关注问题回答

3 个回答

  • P n
    P n
    2017-11-19

    不知道是ios最新版微信,还是说ios最新系统: iOS 11.1.2

    线上版本哎,突然不行了,被客户打爆电话了

    2017-11-19
    赞同
    回复
  • 叶仁宇💴💴💴
    叶仁宇💴💴💴
    2017-11-19

    是最新微信

    2017-11-19
    赞同
    回复
  • P n
    P n
    2017-11-19

    https://developers.weixin.qq.com/blogdetail?action=get_post_info&docid=916a39b4d3a49fe130206ab3b5a02c9b&highline=ios%7C%26wx.canvastotempfilepath%7C%26%E7%9C%9F%E6%9C%BA%7C%26canvastotem%7C%26fail&token=775535107&lang=zh_CN


    刚看到的,周四已经出问题了。

    2017-11-19
    赞同
    回复