Showing
5 changed files
with
17 additions
and
6 deletions
@@ -17,7 +17,7 @@ | @@ -17,7 +17,7 @@ | ||
17 | <span class="iconfont"></span> | 17 | <span class="iconfont"></span> |
18 | </div> | 18 | </div> |
19 | <span class="img-up-tip">0/4</span> | 19 | <span class="img-up-tip">0/4</span> |
20 | - <span class="warn hide"> | 20 | + <span class="warn"> |
21 | <span class="iconfont blue"></span> | 21 | <span class="iconfont blue"></span> |
22 | <span class="blue">最多上传4张照片</span> | 22 | <span class="blue">最多上传4张照片</span> |
23 | </span> | 23 | </span> |
@@ -58,11 +58,11 @@ function refreshBag() { | @@ -58,11 +58,11 @@ function refreshBag() { | ||
58 | $bagGoodsList.empty(); | 58 | $bagGoodsList.empty(); |
59 | $bagGoodsList.parent().addClass('bag-empty'); | 59 | $bagGoodsList.parent().addClass('bag-empty'); |
60 | } | 60 | } |
61 | - | 61 | + |
62 | } | 62 | } |
63 | } | 63 | } |
64 | - }) | ||
65 | -}; | 64 | + }); |
65 | +} | ||
66 | 66 | ||
67 | refreshBag(); | 67 | refreshBag(); |
68 | 68 |
@@ -221,6 +221,8 @@ $refundTable.on('change', '.refund-reason', function() { | @@ -221,6 +221,8 @@ $refundTable.on('change', '.refund-reason', function() { | ||
221 | 221 | ||
222 | upload.up({ | 222 | upload.up({ |
223 | callback: function(result) { | 223 | callback: function(result) { |
224 | + var data = {}; | ||
225 | + | ||
224 | if (result && result.code === 200) { | 226 | if (result && result.code === 200) { |
225 | // 避免异步上传导致数量不统一 | 227 | // 避免异步上传导致数量不统一 |
226 | num = $this.data('num') || 0; | 228 | num = $this.data('num') || 0; |
@@ -231,9 +233,13 @@ $refundTable.on('change', '.refund-reason', function() { | @@ -231,9 +233,13 @@ $refundTable.on('change', '.refund-reason', function() { | ||
231 | } else if (num === 3) { | 233 | } else if (num === 3) { |
232 | $this.addClass('hide'); | 234 | $this.addClass('hide'); |
233 | } | 235 | } |
236 | + data.src = result.data; | ||
237 | + if (data.imgs && data.imgs.length) { | ||
238 | + data.url = data.imgs[0]; | ||
239 | + } | ||
234 | $this.siblings('.img-up-tip').text(++num + '/4'); | 240 | $this.siblings('.img-up-tip').text(++num + '/4'); |
235 | $this.data('num', num); | 241 | $this.data('num', num); |
236 | - $this.before(imgBoxTpl({src: result.data})); | 242 | + $this.before(imgBoxTpl(data)); |
237 | } | 243 | } |
238 | } | 244 | } |
239 | }); | 245 | }); |
1 | -<div class="thumb-box" data-img="{{src}}"> | 1 | +<div class="thumb-box" data-img="{{url}}"> |
2 | <img class="envidence" src="{{src}}" alt="凭证图片"> | 2 | <img class="envidence" src="{{src}}" alt="凭证图片"> |
3 | <div class="operation-box"> | 3 | <div class="operation-box"> |
4 | <a href="{{src}}" target="_blank">查看</a> | 4 | <a href="{{src}}" target="_blank">查看</a> |
-
Please register or login to post a comment