wesmiler 6 лет назад
Родитель
Сommit
57009e7e87
1 измененных файлов с 4 добавлено и 4 удалено
  1. 4 4
      public/static/weixin/js/photo.js

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

@@ -686,12 +686,12 @@ var app = new Vue({
                     $("#cropImg").cropper('destroy');
                     _this.jc = null;
                 }, 500);*/
-                canvas.toBlob(function (e) {
+                canvas.toBlob(function (blob) {
                     //生成Blob的图片格式
-                    if (e != null) {
+                    if (blob != null) {
                         var timestamp = Date.parse(new Date());
-                        e.name = timestamp + ".png";
-                        url = URL.createObjectURL(e);
+                        blob.name = timestamp + ".png";
+                        url = URL.createObjectURL(blob);
                         alert(55);
                         if(_this.cropParams.type && id>=0){
                             _this.picList[id] = _this.cropParams;