Commit 5f70d31f by wuqian

下载素材方式改变

parent 806e5ca1
...@@ -4115,7 +4115,14 @@ const downloadMaterial = async () => { ...@@ -4115,7 +4115,14 @@ const downloadMaterial = async () => {
try { try {
const res = await downloadMaterialApi(selectedIds) const res = await downloadMaterialApi(selectedIds)
if (res.code !== 200) return if (res.code !== 200) return
window.open(filePath + res.message) // window.open(filePath + res.message)
const a = document.createElement('a')
a.href = filePath + res.message
a.download = res.message!
a.target = '_blank'
document.body.appendChild(a)
a.click()
document.body.removeChild(a)
} catch (e) { } catch (e) {
// showError(e) // showError(e)
console.error(e) console.error(e)
......
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