|
|
@@ -655,17 +655,19 @@ var app = new Vue({
|
|
|
$.showLoading('图片处理中...');
|
|
|
var id = _this.cropParams.id;
|
|
|
$image = $("#cropImg");
|
|
|
- $.closePopup();
|
|
|
+ alert(32)
|
|
|
// var canvas = $image.cropper('getCroppedCanvas');
|
|
|
var canvas = $image.cropper('getCroppedCanvas',_this.cropParams.cropData);
|
|
|
var url = canvas.toDataURL('image/jepg');
|
|
|
var timestamp = Date.parse(new Date());
|
|
|
var name = timestamp + ".png";
|
|
|
- if(_this.cropParams.type && id>=0){
|
|
|
+ alert(33)
|
|
|
+ if(_this.cropParams.type>0 && id>=0){
|
|
|
_this.picList[id] = _this.cropParams;
|
|
|
_this.picList[id].url = url;
|
|
|
_this.picList[id].preview = url;
|
|
|
- _this.picList[id].fileData = _this.dataURLtoFile(url, name);
|
|
|
+ alert(34)
|
|
|
+ _this.picList[id].fileData = _this.dataURLtoFile(url, name);
|
|
|
}else{
|
|
|
var data = _this.cropParams;
|
|
|
data.url = url;
|
|
|
@@ -673,10 +675,10 @@ var app = new Vue({
|
|
|
data.fileData = _this.dataURLtoFile(url, name);
|
|
|
_this.picList.push(data);
|
|
|
}
|
|
|
-
|
|
|
- setTimeout(function () {
|
|
|
-
|
|
|
+ alert(35)
|
|
|
+ setTimeout(function () { alert(36)
|
|
|
$.hideLoading();
|
|
|
+ $.closePopup();
|
|
|
_this.cropParams = {};
|
|
|
$("#cropImg").cropper('destroy');
|
|
|
_this.jc = null;
|