修改下载路径使其浏览器支持显示下载文件名(同步更新)
This commit is contained in:
parent
3f0f24dab4
commit
3d57901ea5
@ -204,7 +204,6 @@ const mutations = {
|
|||||||
state.totalVideoTask.splice(0)
|
state.totalVideoTask.splice(0)
|
||||||
},
|
},
|
||||||
_updateGalleryTasks(state, tasks){
|
_updateGalleryTasks(state, tasks){
|
||||||
const downloadUrl = GalleryTaskHandlerUrl + "file?link="
|
|
||||||
tasks.forEach((task) => {
|
tasks.forEach((task) => {
|
||||||
if(task.status === "已提交"){
|
if(task.status === "已提交"){
|
||||||
task.progress = "已提交"
|
task.progress = "已提交"
|
||||||
@ -221,7 +220,7 @@ const mutations = {
|
|||||||
if(url.host === mask['raw'])
|
if(url.host === mask['raw'])
|
||||||
tempLink = task.link.replace(mask['raw'], mask['mask'])
|
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)
|
state.totalGalleryTask.push(task)
|
||||||
})
|
})
|
||||||
@ -231,7 +230,6 @@ const mutations = {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
_updateVideoTasks(state, tasks){
|
_updateVideoTasks(state, tasks){
|
||||||
const downloadUrl = VideoTaskHandlerUrl + "file?link="
|
|
||||||
tasks.forEach((task) => {
|
tasks.forEach((task) => {
|
||||||
task.progress = task.status
|
task.progress = task.status
|
||||||
if(task.status === "下载完成"){
|
if(task.status === "下载完成"){
|
||||||
@ -242,7 +240,7 @@ const mutations = {
|
|||||||
if(url.host === mask['raw'])
|
if(url.host === mask['raw'])
|
||||||
tempLink = task.link.replace(mask['raw'], mask['mask'])
|
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)
|
state.totalVideoTask.push(task)
|
||||||
})
|
})
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user