wesmiler hace 6 años
padre
commit
4b29d8ef2a
Se han modificado 1 ficheros con 4 adiciones y 4 borrados
  1. 4 4
      public/static/weixin/js/photo.js

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

@@ -518,13 +518,13 @@ var app = new Vue({
                 },
                 crop: function (data) {
                     _this.cropParams.data = data;
-                    if(data.width<800){
+                   /* 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: iWidth*10,
                         height: iHeight*10,
@@ -638,7 +638,6 @@ var app = new Vue({
         // 确定剪切
         cropConfirm: function () {
             var _this = this;
-
             $("body").css('overflowY','scroll');
             $(".crop-img").show();
             this.cropPreviewStatus = false;
@@ -649,10 +648,11 @@ var app = new Vue({
                 console.log(_this.cropParams)
                 // var canvas = $image.cropper('getCroppedCanvas');
                 var canvas = $image.cropper('getCroppedCanvas',_this.cropParams.cropData);
-                console.log($image);
                 var url = canvas.toBlob(function (e) {
                     $.closePopup();
                     console.log(e);  //生成Blob的图片格式
+                    alert(JSON.stringify(e))
+                    alert(JSON.stringify(canvas))
                     if (e != null) {
                         var timestamp = Date.parse(new Date());
                         e.name = timestamp + ".png";