|
@@ -6,9 +6,9 @@ var $ = require('jquery'), |
|
@@ -6,9 +6,9 @@ var $ = require('jquery'), |
6
|
var isCouponClick = true,
|
6
|
var isCouponClick = true,
|
7
|
appVersion = $('input[name="app_version"]').val();
|
7
|
appVersion = $('input[name="app_version"]').val();
|
8
|
|
8
|
|
9
|
-$(".coupon-content .receive-btn").on('touchstart', function(e) {
|
9
|
+$(".coupon-content .receive-btn").closest('.swiper-slide').on('touchstart', function(e) {
|
10
|
var that = this,
|
10
|
var that = this,
|
11
|
- code = $(this).closest('.swiper-slide').data('id') || '';
|
11
|
+ code = $(this).data('id') || '';
|
12
|
|
12
|
|
13
|
if (isCouponClick === false) {
|
13
|
if (isCouponClick === false) {
|
14
|
return false;
|
14
|
return false;
|
|
@@ -32,7 +32,7 @@ $(".coupon-content .receive-btn").on('touchstart', function(e) { |
|
@@ -32,7 +32,7 @@ $(".coupon-content .receive-btn").on('touchstart', function(e) { |
32
|
|
32
|
|
33
|
if (data.code === 200) {
|
33
|
if (data.code === 200) {
|
34
|
tip.show('领取成功');
|
34
|
tip.show('领取成功');
|
35
|
- $(that).addClass('padding-20').html('已领取');
|
35
|
+ $(that).find('.receive-btn').addClass('padding-20').html('已领取');
|
36
|
$(that).unbind('touchstart');//移除绑定事件
|
36
|
$(that).unbind('touchstart');//移除绑定事件
|
37
|
return true;
|
37
|
return true;
|
38
|
} else if (data.code === 4401) {
|
38
|
} else if (data.code === 4401) {
|