安卓手机wx.saveImageToPhotosAlbum
发布于 4 年前 作者 yantao 8065 次浏览 来自 问答

调用saveImageToPhotosAlbum()接口时安卓机(已授权)

报错{errMsg: "saveImageToPhotosAlbum:fail invalid fail type"}

wx.getImageInfo({

src: url,

success(res) {

console.log(res)

that.setData({

alertImage: res.path

})

wx.saveImageToPhotosAlbum({

filePath: res.path,

success: res => {

wx.hideLoading()

},

fail(res) {

console.log(res)

wx.hideLoading()

Notify(“保存图片失败”)

}

})

},

fail(res) {

console.log(res)

wx.hideLoading()

Notify(“获取图片失败”)

}

})

1 回复

麻烦提供出现问题的具体机型、微信版本号、系统版本号,以及能复现问题的代码片段(https://developers.weixin.qq.com/miniprogram/dev/devtools/minicode.html

回到顶部