diff --git a/public/react/src/modules/courses/shixunHomework/Listofworks.js b/public/react/src/modules/courses/shixunHomework/Listofworks.js index 4f3c3b9d4..3620f0792 100644 --- a/public/react/src/modules/courses/shixunHomework/Listofworks.js +++ b/public/react/src/modules/courses/shixunHomework/Listofworks.js @@ -1419,12 +1419,14 @@ class Listofworks extends Component { }else if(response.data.status&&response.data.status===-2){ }else{ - const type='application/vnd.openxmlformats-officedocument.spreadsheetml.sheet;charset=utf-8' //excel文件 + const type='application/vnd.openxmlformats-officedocument.spreadsheetml.sheet' //excel文件 const blob = new Blob([response.data], { type: type }) const downloadElement = document.createElement('a') const href = window.URL.createObjectURL(blob) //后台再header中传文件名 const name = decodeURI(response.headers['content-disposition'].split('=')[1]) + console.log(response.headers['content-disposition'].split('=')[1]); + console.log(name); downloadElement.href = href downloadElement.download = name document.body.appendChild(downloadElement)