|
@@ -457,11 +457,12 @@ var app = new Vue({
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
|
// 编辑图片
|
|
// 编辑图片
|
|
|
- picEdit: function (id, data) {
|
|
|
|
|
|
|
+ picEdit: function (id, data, type) {
|
|
|
var _this = this;
|
|
var _this = this;
|
|
|
$.closePopup();
|
|
$.closePopup();
|
|
|
_this.cropParams = data;
|
|
_this.cropParams = data;
|
|
|
_this.cropParams.id = id;
|
|
_this.cropParams.id = id;
|
|
|
|
|
+ _this.cropParams.type = type;
|
|
|
if (_this.cropParams.url == '') {
|
|
if (_this.cropParams.url == '') {
|
|
|
$.toast('请重新添加图片');
|
|
$.toast('请重新添加图片');
|
|
|
return false;
|
|
return false;
|
|
@@ -643,7 +644,7 @@ var app = new Vue({
|
|
|
var timestamp = Date.parse(new Date());
|
|
var timestamp = Date.parse(new Date());
|
|
|
e.name = timestamp + ".png";
|
|
e.name = timestamp + ".png";
|
|
|
url = URL.createObjectURL(e);
|
|
url = URL.createObjectURL(e);
|
|
|
- if(id>=0){
|
|
|
|
|
|
|
+ if(_this.cropParams.type && id>=0){
|
|
|
_this.picList[id] = _this.cropParams;
|
|
_this.picList[id] = _this.cropParams;
|
|
|
_this.picList[id].url = url;
|
|
_this.picList[id].url = url;
|
|
|
_this.picList[id].preview = url;
|
|
_this.picList[id].preview = url;
|
|
@@ -710,7 +711,7 @@ var app = new Vue({
|
|
|
$("#upload").val("");
|
|
$("#upload").val("");
|
|
|
// _this.picList.push(img);
|
|
// _this.picList.push(img);
|
|
|
// console.log(_this.picList)
|
|
// console.log(_this.picList)
|
|
|
- _this.picEdit(-1, img);
|
|
|
|
|
|
|
+ _this.picEdit(0, img, 0);
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
})
|
|
})
|