...
|
...
|
@@ -221,6 +221,8 @@ $refundTable.on('change', '.refund-reason', function() { |
|
|
|
|
|
upload.up({
|
|
|
callback: function(result) {
|
|
|
var data = {};
|
|
|
|
|
|
if (result && result.code === 200) {
|
|
|
// 避免异步上传导致数量不统一
|
|
|
num = $this.data('num') || 0;
|
...
|
...
|
@@ -231,9 +233,13 @@ $refundTable.on('change', '.refund-reason', function() { |
|
|
} else if (num === 3) {
|
|
|
$this.addClass('hide');
|
|
|
}
|
|
|
data.src = result.data;
|
|
|
if (data.imgs && data.imgs.length) {
|
|
|
data.url = data.imgs[0];
|
|
|
}
|
|
|
$this.siblings('.img-up-tip').text(++num + '/4');
|
|
|
$this.data('num', num);
|
|
|
$this.before(imgBoxTpl({src: result.data}));
|
|
|
$this.before(imgBoxTpl(data));
|
|
|
}
|
|
|
}
|
|
|
});
|
...
|
...
|
|