wesmiler 6 tahun lalu
induk
melakukan
7847c0f576
1 mengubah file dengan 3 tambahan dan 5 penghapusan
  1. 3 5
      public/static/weixin/js/photo.js

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

@@ -518,11 +518,9 @@ var app = new Vue({
                 crop: function (data) {
                     _this.cropParams.data = data;
                     _this.cropParams.cropData = {
-                        width: iWidth * 10,
-                        height: iHeight * 10,
+                        width: data.width * 10,
+                        height: data.height * 10,
                         rotate: data.rotate,
-                        top: 0,
-                        left: 0,
                         fillColor: '#fff',
                     };
                 }
@@ -637,7 +635,7 @@ var app = new Vue({
                     console.log(e);  //生成Blob的图片格式
                     if (e != null) {
                         var timestamp = Date.parse(new Date());
-                        e.name = timestamp + ".png";
+                        e.name = timestamp + ".jpeg";
                         url = URL.createObjectURL(e);
                         if(id>=0){
                             _this.picList[id] = _this.cropParams;