wesmiler před 6 roky
rodič
revize
842e8dfd2d
1 změnil soubory, kde provedl 9 přidání a 5 odebrání
  1. 9 5
      public/static/weixin/js/photo.js

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

@@ -574,9 +574,13 @@ var app = new Vue({
             $(".crop-preview").hide();
             this.cropPreviewStatus = false;
             if (this.jc != null) {
-                $("#cropImg").cropper('destroy');
-                this.jc = null;
-                $("#cropImg").remove();
+                $.showLoading('图片处理中...');
+                setTimeout(function() {
+                    $.hideLoading();
+                    $("#cropImg").cropper('destroy');
+                    this.jc = null;
+                    $("#cropImg").remove();
+                }, 200);
             }
 
         },
@@ -600,9 +604,9 @@ var app = new Vue({
                         reader.onloadend = function (even) {
                             var img = {
                                 id: 0,
-                                url: blobUrl,
+                                url: even.currentTarget.result,
                                 // url: even.currentTarget.result,
-                                preview: blobUrl,
+                                preview: even.currentTarget.result,
                                 name: file.name,
                                 blobUrl: blobUrl,
                                 file_size: file.size,