This commit is contained in:
zhangsir
2024-08-01 08:57:40 +08:00
parent 35010c7dd6
commit 485c401943

View File

@@ -537,12 +537,10 @@ export default {
if (!(response.headers['content-type']).startsWith('application/json')) {
this.resolveBlob(response, 'application/zip', `${params.courseName}【作业】`);
} else {
console.log(response,'response')
const reader = new FileReader();
reader.onload = function(e) {
reader.onload = (e) => {
const errorData = JSON.parse(e.target.result)
console.log(errorData.result,'result')
const message = errorData.result
this.$message.error(message)
this.$message.error(errorData.result)
};
reader.readAsText(response.data);