谢杰标 преди 2 години
родител
ревизия
ff019223c5
променени са 2 файла, в които са добавени 2 реда и са изтрити 2 реда
  1. 1 1
      common/compressPhoto.js
  2. 1 1
      pages3/polyv/detail.vue

+ 1 - 1
common/compressPhoto.js

@@ -76,12 +76,12 @@ function myCompressImage(url, limitSize = 2048) {
       // #endif
     }
     const size = url.size;
-    console.log(size, "压缩前");
     if (size < limitSize) {
       return _resolve(url);
     }
     num++;
     const quality = limitSize / size;
+    console.log(size, quality, "压缩前");
     // #ifdef MP-WEIXIN
     getLessLimitSizeImage(url.path, quality);
     // #endif

+ 1 - 1
pages3/polyv/detail.vue

@@ -3071,7 +3071,7 @@ export default {
     imageInfos() {
       var self = this;
       return new Promise(async (resolve, reject) => {
-        let resPath = await myCompressImage(this.avatarUrl || this.faceUrl, 50);
+        let resPath = await myCompressImage(this.avatarUrl || this.faceUrl, 100);
         const waitUpload = await self.uploadFile(resPath, 0);
         resolve(waitUpload);
       });