Răsfoiți Sursa

上传图片前先进行压缩

lihongxiao 2 ani în urmă
părinte
comite
1ea2159123
1 a modificat fișierele cu 3 adăugiri și 3 ștergeri
  1. 3 3
      src/views/Letter/Letter.vue

+ 3 - 3
src/views/Letter/Letter.vue

@@ -6112,7 +6112,7 @@ export default {
               imageType: type,
               imageType: type,
             })
             })
           }
           }
-          that[type + 'File'] = file;
+          that[type + 'File'] = aaa;
         } else {
         } else {
           that.$message({ message: res.msg, type: "warning" });
           that.$message({ message: res.msg, type: "warning" });
         }
         }
@@ -6170,7 +6170,7 @@ export default {
       params.append("type", "image");
       params.append("type", "image");
       that.$api.letter.uploadFile(params).then(res => {
       that.$api.letter.uploadFile(params).then(res => {
         if (res.code == "200") {
         if (res.code == "200") {
-          let type = 'C0' + that.userIndex;
+          let type = 'D0' + that.userIndex;
           if (that['imageList' + that.userIndex].some(v => v.imageType == type)) {
           if (that['imageList' + that.userIndex].some(v => v.imageType == type)) {
             that['imageList' + that.userIndex].map(val => {
             that['imageList' + that.userIndex].map(val => {
               if (val.imageType == type) {
               if (val.imageType == type) {
@@ -6183,7 +6183,7 @@ export default {
               imageType: type,
               imageType: type,
             })
             })
           }
           }
-          that[type + 'File'] = file;
+          that[type + 'File'] = aaa;
         } else {
         } else {
           that.$message({ message: res.msg, type: "warning" });
           that.$message({ message: res.msg, type: "warning" });
         }
         }