wesmiler %!s(int64=6) %!d(string=hai) anos
pai
achega
7847c0f576
Modificáronse 1 ficheiros con 3 adicións e 5 borrados
  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;