const downloadTask = uni.downloadFile({
url: this.video_url,
success: (e) => {
this.$refs.Loading.hide()
console.log(e)
uni.saveVideoToPhotosAlbum({
filePath: e.tempFilePath,
success: (e) => {
console.log(e)
uni.hideLoading()
uni.showToast({
icon: 'none',
title: '已保存到手机相册'
})
},
fail: () => {
uni.hideLoading()
uni.showToast({
icon: 'none',
title: '保存到手机相册失败' + e.tempFilePath
})
},
complete() {
}
});
},
fail: (e) => {
this.$refs.Loading.hide()
console.log(e.errMsg.indexOf("abort"))
console.log(e.errMsg)
if(e.errMsg.indexOf("abort") == -1 ){
uni.showModal({
content: '下载失败,' + e.errMsg+'请联系客服',
showCancel: false
})
}
}
});
2 个回复
4***@qq.com (作者)
没有官方大大 回复一下吗
4***@qq.com (作者)
顶 官方大大