onShareLoad() {
const imgSrc = this.data.url;
const base64 = imgSrc.split('data:image/png;base64,')[1]
const save = wx.getFileSystemManager();
const number = Math.random();
save.writeFile({
filePath: wx.env.USER_DATA_PATH + '/pic' + number + '.jpg',
data: base64,
encoding: 'base64',
success: res => {
wx.saveImageToPhotosAlbum({
filePath: wx.env.USER_DATA_PATH + '/pic' + number + '.jpg',
success: (res) => {
this.setData({
isResetNoteContent: true
})
},
fail: (err) => {
console.log(err)
}
})
},
fail: err => {
console.log(err)
}
})
},
2023年2月10日,此BUG依然存在