Commit 2b365d32 by qinjianhui

Merge branch 'dev' into 'master'

fix: 批量下载bug修复

See merge request !52
parents 3d4c5feb 306c9c3e
......@@ -1910,15 +1910,14 @@ const handleDownload = async (row: PodUsOrderListData) => {
try {
const res = await batchDownloadDownloadApi({ id: row.id })
if (res.code !== 200 || !res.message) return
const url = filePath + res.message
fetch(res.message)
fetch(url)
.then((res) => res.blob())
.then((blob) => {
const link = document.createElement('a')
link.href = URL.createObjectURL(blob)
link.download = res.message
? res.message.split('/').pop() || 'download'
: 'download'
link.download = url ? url.split('/').pop() || 'download' : 'download'
link.click()
})
ElMessage.success('操作成功')
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment