saveImg() {
uni.downloadFile({
url: this.url,
success: function(res) {
if (res.statusCode === 200) {
var file = res.tempFilePath
console.log(res.tempFilePath)
uni.saveImageToPhotosAlbum({
filePath: res.tempFilePath,
success: function(res) {
uni.showToast({
title: '保存成功',
icon: "none"
});
},
fail: function(res) {
uni.showModal({
title: res.errMsg,
content:file,
});
}
});
}
},
fail: function() {
console.log('fail')
}
})
},

1***@qq.com
- 发布:2020-09-22 11:06
- 更新:2020-09-22 11:06
- 阅读:1079
