谢杰标 3 éve
szülő
commit
0230265bf7
2 módosított fájl, 23 hozzáadás és 12 törlés
  1. 12 7
      src/pages/course-detail/index.vue
  2. 11 5
      src/pages/live-detail/index.vue

+ 12 - 7
src/pages/course-detail/index.vue

@@ -3500,7 +3500,7 @@ export default {
         return;
       }
     },
-   async changePhotoListStamp(params, fileList) {
+    async changePhotoListStamp(params, fileList) {
       let file = await this.uploadRules(params);
       if (fileList.length == 1) {
         fileList.splice(0, 1);
@@ -3574,10 +3574,15 @@ export default {
           reject(false);
         }
         if (sizeToM > 2) {
-          imageConversion.compressAccurately(file, 1024 * 2).then((res) => {
-            res = new File([res], file.name, { type: res.type });
-            resolve(res);
-          });
+          imageConversion.compressAccurately(file, {
+              size: 1024 * 2,
+              width:1000,
+              height:1000
+            })
+            .then((res) => {
+              res = new File([res], file.name, { type: res.type });
+              resolve(res);
+            });
         } else {
           resolve(file);
         }
@@ -6164,7 +6169,7 @@ export default {
         if (this.isFullScreen()) {
           this.exitFullscreen();
         }
-      } 
+      }
       this.$nextTick(() => {
         if (
           (window.navigator.mediaDevices &&
@@ -8307,7 +8312,7 @@ export default {
           right: 0;
           bottom: 0;
           margin: 30px auto 0;
-          box-shadow: 0 0 0 2000px rgba(0,0,0,0.4);
+          box-shadow: 0 0 0 2000px rgba(0, 0, 0, 0.4);
         }
       }
     }

+ 11 - 5
src/pages/live-detail/index.vue

@@ -3101,10 +3101,16 @@ export default {
           reject(false);
         }
         if (sizeToM > 2) {
-          imageConversion.compressAccurately(file, 1024 * 2).then((res) => {
-            res = new File([res], file.name, { type: res.type });
-            resolve(res);
-          });
+          imageConversion
+            .compressAccurately(file, {
+              size: 1024 * 2,
+              width: 1000,
+              height: 1000,
+            })
+            .then((res) => {
+              res = new File([res], file.name, { type: res.type });
+              resolve(res);
+            });
         } else {
           resolve(file);
         }
@@ -7472,7 +7478,7 @@ export default {
           right: 0;
           bottom: 0;
           margin: 30px auto 0;
-          box-shadow: 0 0 0 2000px rgba(0,0,0,0.4);
+          box-shadow: 0 0 0 2000px rgba(0, 0, 0, 0.4);
         }
       }
     }