wesmiler 6 tahun lalu
induk
melakukan
7251ddac4d
1 mengubah file dengan 9 tambahan dan 2 penghapusan
  1. 9 2
      public/static/weixin/js/photo.js

+ 9 - 2
public/static/weixin/js/photo.js

@@ -515,9 +515,16 @@ var app = new Vue({
                 },
                 crop: function (data) {
                     _this.cropParams.data = data;
+                    if(data.width<800){
+                        var width = data.width*10;
+                        var height = data.height*10;
+                    }else{
+                        var width = data.width;
+                        var height = data.height;
+                    }
                     _this.cropParams.cropData = {
-                        width: data.width * 10,
-                        height: data.height * 10,
+                        width: width * 10,
+                        height: height * 10,
                         rotate: data.rotate,
                         fillColor: '#fff',
                     };