Commit ef98dcea by wusiyi

fix: podus tiff下载bug修复

parent f75b0645
......@@ -1926,17 +1926,21 @@ const handleDownload = async (row: PodUsOrderListData, type: string) => {
? filePath + row.url
: `https://ps.jomalls.com/tiff/` + row.tiffUrl
const response = await fetch(url)
if (!response.ok) {
throw new Error('网络响应错误')
if (type === 'tiff') {
window.open(url, '_blank')
tifDownloadLoading.value = false
} else {
const response = await fetch(url)
if (!response.ok) {
throw new Error('网络响应错误')
}
const blob = await response.blob()
const link = document.createElement('a')
link.href = URL.createObjectURL(blob)
link.download = url ? url.split('/').pop() || 'download' : 'download'
link.click()
}
const blob = await response.blob()
const link = document.createElement('a')
link.href = URL.createObjectURL(blob)
link.download = url ? url.split('/').pop() || 'download' : 'download'
link.click()
await batchDownloadDownloadApi({ id: row.id, type })
ElMessage.success('操作成功')
search()
......
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