Преглед изворни кода

作品附件-作品链接调整

bruce пре 5 година
родитељ
комит
4eec89f1ab
2 измењених фајлова са 3 додато и 2 уклоњено
  1. 2 2
      components/works/editor.vue
  2. 1 0
      mixins/oos.js

+ 2 - 2
components/works/editor.vue

@@ -196,8 +196,8 @@
           return;
         }
 
-        let workFile = this.uploadFileList.length > 0 ? this.uploadFileList[0].path : "";
-
+        let workFile = this.uploadFileList.length > 0 ? this.uploadFileList[0].url : "";
+        console.log(this.uploadFileList);
         const data = {
           name: this.workName,
           description: this.content,

+ 1 - 0
mixins/oos.js

@@ -157,6 +157,7 @@ export default {
       this.$axios.$post("/file/uploadCallBack", this.fileUploadCallBackParams).then((res) => {
         this.fileUploadCallBackParams = {return_data: {data: {}, status: 0}, upload_id: ""};
         if (res.status === 1) {
+          this.uploadFileList = [];
           this.uploadFileList.push({name: res.data.name, url: res.data.url, path: res.data.path});
           this.$message.success("上传成功");
         } else {