Showing
1 changed file
with
11 additions
and
8 deletions
@@ -16,12 +16,18 @@ function get() { | @@ -16,12 +16,18 @@ function get() { | ||
16 | url: '/index/life/sendCoupon', | 16 | url: '/index/life/sendCoupon', |
17 | dataType: 'json', | 17 | dataType: 'json', |
18 | success: function(data) { | 18 | success: function(data) { |
19 | + $('.statu').html(data.message); | ||
20 | + $('.statu-mark').show(); | ||
21 | + $('.statu-box').show(); | ||
19 | if (data.code === 200) { | 22 | if (data.code === 200) { |
20 | - location.href = '/life/coupon' + '?' + 'code' + '=' + data.data; | 23 | + $('.sure').click(function() { |
24 | + location.href = '/life/coupon' + '?' + 'code' + '=' + data.data; | ||
25 | + }); | ||
21 | } else { | 26 | } else { |
22 | - $('.statu').html(data.message); | ||
23 | - $('.statu-mark').show(); | ||
24 | - $('.statu-box').show(); | 27 | + $('.sure').click(function() { |
28 | + $('.statu-mark').hide(); | ||
29 | + $('.statu-box').hide(); | ||
30 | + }); | ||
25 | } | 31 | } |
26 | } | 32 | } |
27 | }); | 33 | }); |
@@ -30,7 +36,4 @@ function get() { | @@ -30,7 +36,4 @@ function get() { | ||
30 | $('.coupon-btn').click(function() { | 36 | $('.coupon-btn').click(function() { |
31 | get(); | 37 | get(); |
32 | }); | 38 | }); |
33 | -$('.sure').click(function() { | ||
34 | - $('.statu-mark').hide(); | ||
35 | - $('.statu-box').hide(); | ||
36 | -}); | 39 | + |
-
Please register or login to post a comment