|
@@ -18,8 +18,9 @@ var goodsDiscountEl = document.getElementById('goodsDiscount'), |
|
@@ -18,8 +18,9 @@ var goodsDiscountEl = document.getElementById('goodsDiscount'), |
18
|
|
18
|
|
19
|
var $cart = $('.cart-bar');
|
19
|
var $cart = $('.cart-bar');
|
20
|
|
20
|
|
21
|
-var limitSaleBtn = document.getElementById('limit-sale'),
|
|
|
22
|
- limitSaleHammer = limitSaleBtn && new Hammer(limitSaleBtn);
|
21
|
+var limitSaleHammer = (limitSaleHammer = document.getElementById('limit-sale')) && new Hammer(limitSaleHammer);
|
|
|
22
|
+
|
|
|
23
|
+var appUrl = $('input[name="limitCodeUrl"]').val();
|
23
|
|
24
|
|
24
|
var dialog = require('../../me/dialog');
|
25
|
var dialog = require('../../me/dialog');
|
25
|
|
26
|
|
|
@@ -80,7 +81,7 @@ if (goodsDiscountHammer && $discountFolder.children().length > 0) { |
|
@@ -80,7 +81,7 @@ if (goodsDiscountHammer && $discountFolder.children().length > 0) { |
80
|
});
|
81
|
});
|
81
|
}
|
82
|
}
|
82
|
|
83
|
|
83
|
-limitSaleHammer ? limitSaleHammer.on('tap', function(e) {
|
84
|
+limitSaleHammer && limitSaleHammer.on('tap', function(e) {
|
84
|
e.srcEvent.stopPropagation();
|
85
|
e.srcEvent.stopPropagation();
|
85
|
dialog.showDialog({
|
86
|
dialog.showDialog({
|
86
|
dialogText: '进入有货APP尖货频道分享\n以获取限购码',
|
87
|
dialogText: '进入有货APP尖货频道分享\n以获取限购码',
|
|
@@ -88,7 +89,7 @@ limitSaleHammer ? limitSaleHammer.on('tap', function(e) { |
|
@@ -88,7 +89,7 @@ limitSaleHammer ? limitSaleHammer.on('tap', function(e) { |
88
|
rightBtnText: '打开Yoho!Buy有货APP'
|
89
|
rightBtnText: '打开Yoho!Buy有货APP'
|
89
|
}
|
90
|
}
|
90
|
}, function() {
|
91
|
}, function() {
|
91
|
- console.log('111');
|
92
|
+ window.location.href = appUrl;
|
92
|
}, undefined, true);
|
93
|
}, undefined, true);
|
93
|
|
94
|
|
94
|
$('.dialog-wrapper').off('touchstart').on('touchstart', function(e) {
|
95
|
$('.dialog-wrapper').off('touchstart').on('touchstart', function(e) {
|
|
@@ -97,7 +98,7 @@ limitSaleHammer ? limitSaleHammer.on('tap', function(e) { |
|
@@ -97,7 +98,7 @@ limitSaleHammer ? limitSaleHammer.on('tap', function(e) { |
97
|
dialog.hideDialog();
|
98
|
dialog.hideDialog();
|
98
|
}
|
99
|
}
|
99
|
});
|
100
|
});
|
100
|
-}) : null;
|
101
|
+});
|
101
|
|
102
|
|
102
|
require('./desc');
|
103
|
require('./desc');
|
103
|
require('./comments-consults');
|
104
|
require('./comments-consults');
|