Commit 32527e15 by wuqian

下载素材展示修改

parent 64fc6101
......@@ -420,7 +420,14 @@ const download = async () => {
try {
const res = await downloadMaterialApi([id])
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) {
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