张延森 4 anni fa
parent
commit
8b07d00fca
1 ha cambiato i file con 1 aggiunte e 1 eliminazioni
  1. 1
    1
      src/utils/request.js

+ 1
- 1
src/utils/request.js Vedi File

@@ -49,7 +49,7 @@ service.interceptors.response.use(
49 49
       const download = document.createElement('a')
50 50
       download.setAttribute('href', url)
51 51
       debugger
52
-      download.setAttribute('download', decodeURIComponent(fileName))
52
+      download.setAttribute('download', unescape(decodeURIComponent(fileName).replace(/\\/g, '%')))
53 53
       download.click()
54 54
       return
55 55
     }