Showing
5 changed files
with
54 additions
and
4 deletions
@@ -36,7 +36,7 @@ | @@ -36,7 +36,7 @@ | ||
36 | </p> | 36 | </p> |
37 | <p> | 37 | <p> |
38 | 我们会在入库后的1-3个工作日内处理您的退款,如有疑问,请联系 | 38 | 我们会在入库后的1-3个工作日内处理您的退款,如有疑问,请联系 |
39 | - <a href="http://chat8.live800.com/live800/chatClient/chatbox.jsp?companyID=620092&configID=149091&jid=8732423409" class="online-service"> | 39 | + <a href="http://chat8.live800.com/live800/chatClient/chatbox.jsp?companyID=620092&configID=149091&jid=8732423409" class="online-service" target="_blank"> |
40 | <span class="iconfont blue"></span> | 40 | <span class="iconfont blue"></span> |
41 | <span class="blue">在线客服</span> | 41 | <span class="blue">在线客服</span> |
42 | </a> | 42 | </a> |
@@ -14,6 +14,8 @@ var phoneReg = /^(13[0-9]|15[012356789]|17[678]|18[0-9]|14[57])[0-9]{8}$/; | @@ -14,6 +14,8 @@ var phoneReg = /^(13[0-9]|15[012356789]|17[678]|18[0-9]|14[57])[0-9]{8}$/; | ||
14 | 14 | ||
15 | var validate = require('./order/validation'); | 15 | var validate = require('./order/validation'); |
16 | 16 | ||
17 | +var imgBoxTpl = require('../../tpl/me/thumbnail.hbs'); | ||
18 | + | ||
17 | var validateMap = { | 19 | var validateMap = { |
18 | user: { | 20 | user: { |
19 | sl: '#user', | 21 | sl: '#user', |
@@ -400,6 +402,17 @@ function initAddr(areaCode) { | @@ -400,6 +402,17 @@ function initAddr(areaCode) { | ||
400 | } | 402 | } |
401 | } | 403 | } |
402 | 404 | ||
405 | +function bindImgDeleteEvent() { | ||
406 | + $('.operation-box .delete').off('click').on('click', function() { | ||
407 | + var $thumb = $(this).closest('.thumb-box'); | ||
408 | + var $t = $thumb.siblings('.img-up-tip'); | ||
409 | + var number = $('.thumb-box').length - 1; | ||
410 | + | ||
411 | + $t.text(number + '/4'); | ||
412 | + $thumb.remove(); | ||
413 | + }); | ||
414 | +} | ||
415 | + | ||
403 | function bindUploadEvent() { | 416 | function bindUploadEvent() { |
404 | var $tip = $('.img-up-tip'); | 417 | var $tip = $('.img-up-tip'); |
405 | 418 | ||
@@ -419,12 +432,13 @@ function bindUploadEvent() { | @@ -419,12 +432,13 @@ function bindUploadEvent() { | ||
419 | var $t; | 432 | var $t; |
420 | 433 | ||
421 | if (result.code === 200) { | 434 | if (result.code === 200) { |
422 | - img = '<img class="envidence" src="' + result.data + '" alt="凭证图片">'; | 435 | + img = imgBoxTpl({src: result.data}); |
423 | $t = $(that).next('.img-up-tip'); | 436 | $t = $(that).next('.img-up-tip'); |
424 | 437 | ||
425 | $(that).before(img); | 438 | $(that).before(img); |
426 | number += 1; | 439 | number += 1; |
427 | $t.text(number + '/4'); | 440 | $t.text(number + '/4'); |
441 | + bindImgDeleteEvent(); | ||
428 | } else { | 442 | } else { |
429 | new _alert(result.message).show(); | 443 | new _alert(result.message).show(); |
430 | } | 444 | } |
@@ -272,7 +272,7 @@ $('#brand-fav').click(function() { | @@ -272,7 +272,7 @@ $('#brand-fav').click(function() { | ||
272 | }).then(function(data) { | 272 | }).then(function(data) { |
273 | if (data.code === 200) { | 273 | if (data.code === 200) { |
274 | $this.toggleClass('coll'); | 274 | $this.toggleClass('coll'); |
275 | - } else if (data.code === 403) { | 275 | + } else if (data.code === 400) { |
276 | location.href = data.data.refer; | 276 | location.href = data.data.refer; |
277 | } | 277 | } |
278 | }); | 278 | }); |
@@ -21,6 +21,36 @@ | @@ -21,6 +21,36 @@ | ||
21 | } | 21 | } |
22 | } | 22 | } |
23 | 23 | ||
24 | + .thumb-box { | ||
25 | + position: relative; | ||
26 | + float: left; | ||
27 | + | ||
28 | + .operation-box { | ||
29 | + display: none; | ||
30 | + width: 60px; | ||
31 | + padding: 5px 0; | ||
32 | + position: absolute; | ||
33 | + top: 0; | ||
34 | + background-color: rgba(0, 0, 0, 0.6); | ||
35 | + text-align: center; | ||
36 | + font-size: 12px; | ||
37 | + | ||
38 | + .delete { | ||
39 | + cursor: pointer; | ||
40 | + } | ||
41 | + | ||
42 | + * { | ||
43 | + color: #fff !important; | ||
44 | + } | ||
45 | + } | ||
46 | + | ||
47 | + &:hover { | ||
48 | + .operation-box { | ||
49 | + display: block; | ||
50 | + } | ||
51 | + } | ||
52 | + } | ||
53 | + | ||
24 | .iconfont { | 54 | .iconfont { |
25 | &.checkbox { | 55 | &.checkbox { |
26 | position: relative; | 56 | position: relative; |
@@ -178,6 +208,5 @@ | @@ -178,6 +208,5 @@ | ||
178 | width: 60px; | 208 | width: 60px; |
179 | height: 60px; | 209 | height: 60px; |
180 | margin-right: 10px; | 210 | margin-right: 10px; |
181 | - float: left; | ||
182 | } | 211 | } |
183 | } | 212 | } |
-
Please register or login to post a comment