更新上传接口与重新处理返回数据

dev_2022-05-11
yujialong 3 years ago
parent 36b348a533
commit 5d6a20c796
  1. 4
      src/components/quill/index.vue
  2. 2
      src/pages/course/courseManagement/add.vue
  3. 8
      src/pages/course/courseManagement/contentSettings.vue
  4. 2
      src/pages/information/contentManage/addArticle.vue
  5. 4
      src/pages/match/add.vue
  6. 4
      src/pages/match/manage/matchDetail.vue

@ -180,11 +180,11 @@ export default {
//
let quill = this.Quill;
//
if (res.filesResult.fileUrl) {
if (res.data.filesResult.fileUrl) {
//
let length = quill.getSelection().index;
// res
quill.insertEmbed(length, "image", res.filesResult.fileUrl);
quill.insertEmbed(length, "image", res.data.filesResult.fileUrl);
//
quill.setSelection(length + 1);
} else {

@ -170,7 +170,7 @@ export default {
util.warningMsg("当前限制选择 1 个文件,如需更换,请删除上一个文件再重新选择!");
},
uploadSuccess(res, file, fileList) {
this.coverUrl = res.filesResult.fileUrl;
this.coverUrl = res.data.filesResult.fileUrl;
// this.uploadList.push({ name: file.name, url: response.message.fileUrl });
},
uploadError(err, file, fileList) {

@ -310,10 +310,10 @@ export default {
},
uploadSuccess(res, file, fileList) {
this.uploading = false;
this.fileId = res.filesResult.fileId;
this.fileType = res.filesResult.fileType;
this.fileUrl = res.filesResult.fileUrl;
this.fileName = res.filesResult.ossFileName;
this.fileId = res.data.filesResult.fileId;
this.fileType = res.data.filesResult.fileType;
this.fileUrl = res.data.filesResult.fileUrl;
this.fileName = res.data.filesResult.ossFileName;
},
uploadError(err, file, fileList) {
this.$message({

@ -157,7 +157,7 @@ export default {
}).catch(res => {
});
}
this.coverUrl = res.filesResult.fileUrl;
this.coverUrl = res.data.filesResult.fileUrl;
},
uploadError(err, file, fileList) {
this.$message({

@ -270,7 +270,7 @@ export default {
}).catch(res => {
});
}
this.coverUrl = res.filesResult.fileUrl;
this.coverUrl = res.data.filesResult.fileUrl;
},
uploadLgSuccess(res, file, fileList) {
if (this.carouselUrl) {
@ -279,7 +279,7 @@ export default {
}).catch(res => {
});
}
this.carouselUrl = res.filesResult.fileUrl;
this.carouselUrl = res.data.filesResult.fileUrl;
},
uploadError(err, file, fileList) {
this.$message({

@ -243,7 +243,7 @@ export default {
}).catch(res => {
});
}
this.coverUrl = res.filesResult.fileUrl;
this.coverUrl = res.data.filesResult.fileUrl;
},
uploadLgSuccess(res, file, fileList) {
if (this.carouselUrl) {
@ -252,7 +252,7 @@ export default {
}).catch(res => {
});
}
this.carouselUrl = res.filesResult.fileUrl;
this.carouselUrl = res.data.filesResult.fileUrl;
},
uploadError(err, file, fileList) {
this.$message({

Loading…
Cancel
Save