wesmiler 6 vuotta sitten
vanhempi
commit
7251ddac4d
1 muutettua tiedostoa jossa 9 lisäystä ja 2 poistoa
  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) {
                 crop: function (data) {
                     _this.cropParams.data = 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 = {
                     _this.cropParams.cropData = {
-                        width: data.width * 10,
-                        height: data.height * 10,
+                        width: width * 10,
+                        height: height * 10,
                         rotate: data.rotate,
                         rotate: data.rotate,
                         fillColor: '#fff',
                         fillColor: '#fff',
                     };
                     };