xiangpei
2024-12-03 7392789233dfff6df56cc1ee0097804713ad51f3
文件bug
2个文件已修改
16 ■■■■■ 已修改文件
src/components/UploadC.vue 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/onlineStudy/file.vue 8 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/components/UploadC.vue
@@ -62,9 +62,11 @@
      this.$emit('removeFile', this.fileUrl, file.name);
    },
    handleUploadSuccess(res, file) {
      this.fileUrl.push(res.response);
      console.log("当前文件信息")
      this.$emit('getUploadUrl', this.fileUrl);
      if (res.response) {
        this.fileUrl.push(res.response);
        console.log("当前文件信息", res.response)
        this.$emit('getUploadUrl', this.fileUrl);
      }
    },
    beforeUpload(file) {
      const { type } = file;
src/views/onlineStudy/file.vue
@@ -197,11 +197,15 @@
      this.form.attachment = fileList.filter(item => item.name !== fileName);
    },
    getUploadAttachmentUrl(uploadData) {
      this.form.attachment = uploadData;
      if (uploadData) {
        this.form.attachment = uploadData;
      }
    },
    getUploadUrl(uploadData) {
      console.log("收到:", uploadData)
      this.form.contentUrl = uploadData;
      if (uploadData) {
        this.form.contentUrl = uploadData;
      }
    },
    remove(id) {
      OnlineStudyAPI.remove([id]).then(res => {