wesmiler пре 6 година
родитељ
комит
a600dac9f5
1 измењених фајлова са 2 додато и 3 уклоњено
  1. 2 3
      public/static/weixin/js/photo.js

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

@@ -467,8 +467,7 @@ var app = new Vue({
                 return false;
             }
             $("body").css('overflowY','hidden');
-            /*_this.image = new Image();
-            _this.image.src = data.url;*/
+            $("#cropImg").remove();
             $(".crop-img").html('<img id="cropImg" src="" alt="" off="">');
             var iWidth = $(".crop-img").outerWidth();
             var iHeight = $(".crop-img").outerHeight();
@@ -527,7 +526,7 @@ var app = new Vue({
 
             if (_this.jc != null) {
                 $image.cropper(_this.options);
-                $image.cropper('replace', _this.cropParams.blobUrl);
+                _this.jc = $image.cropper('replace', _this.cropParams.blobUrl);
             } else {
                 $image.cropper(_this.options);
                 _this.jc = $image.cropper('replace', _this.cropParams.blobUrl);