修改下载路径使其浏览器支持显示下载文件名(同步更新)

This commit is contained in:
chuzhongzai 2022-10-08 22:55:14 +08:00
parent 821cf1e62d
commit e7d8997bdf

View File

@ -204,7 +204,6 @@ const mutations = {
state.totalVideoTask.splice(0)
},
_updateGalleryTasks(state, tasks){
const downloadUrl = GalleryTaskHandlerUrl + "file?link="
tasks.forEach((task) => {
if(task.status === "已提交"){
task.progress = "已提交"
@ -221,7 +220,7 @@ const mutations = {
if(url.host === mask['raw'])
tempLink = task.link.replace(mask['raw'], mask['mask'])
})
task.download = downloadUrl + tempLink + "&AuthCode=" + state.AuthCode
task.download = GalleryTaskHandlerUrl + "file/" + encodeURI(task.name) + "?link=" + tempLink + "&AuthCode=" + state.AuthCode
}
state.totalGalleryTask.push(task)
})
@ -231,7 +230,6 @@ const mutations = {
}
},
_updateVideoTasks(state, tasks){
const downloadUrl = VideoTaskHandlerUrl + "file?link="
tasks.forEach((task) => {
task.progress = task.status
if(task.status === "下载完成"){
@ -242,7 +240,7 @@ const mutations = {
if(url.host === mask['raw'])
tempLink = task.link.replace(mask['raw'], mask['mask'])
})
task.download = downloadUrl + tempLink + "&AuthCode=" + state.AuthCode
task.download = VideoTaskHandlerUrl + "file/" + encodeURI(task.name) + "?link=" + tempLink + "&AuthCode=" + state.AuthCode
}
state.totalVideoTask.push(task)
})