wesmiler преди 6 години
родител
ревизия
6073277cd2
променени са 1 файла, в които са добавени 5 реда и са изтрити 5 реда
  1. 5 5
      public/static/weixin/js/photo.js

+ 5 - 5
public/static/weixin/js/photo.js

@@ -524,10 +524,10 @@ var app = new Vue({
                         var height = data.height;
                     }
                     _this.cropParams.cropData = {
-                        width: data.width*20,
-                        height: data.height*20,
+                        width: iWidth*30,
+                        height: iHeight*30,
                         rotate: data.rotate,
-                        imageSmoothingQuality: 'height',
+                        imageSmoothingQuality: 'high',
                         fillColor: '#fff',
                     };
                 }
@@ -636,8 +636,8 @@ var app = new Vue({
                 var id = _this.cropParams.id;
                 $image = $("#cropImg");
                 console.log(_this.cropParams)
-                var canvas = $image.cropper('getCroppedCanvas');
-                // var canvas = $image.cropper('getCroppedCanvas',_this.cropParams.cropData);
+                // var canvas = $image.cropper('getCroppedCanvas');
+                var canvas = $image.cropper('getCroppedCanvas',_this.cropParams.cropData);
                 console.log($image);
                 var url = canvas.toBlob(function (e) {
                     console.log(e);  //生成Blob的图片格式