Authored by biao

加入打开app链接

... ... @@ -18,8 +18,9 @@ var goodsDiscountEl = document.getElementById('goodsDiscount'),
var $cart = $('.cart-bar');
var limitSaleBtn = document.getElementById('limit-sale'),
limitSaleHammer = limitSaleBtn && new Hammer(limitSaleBtn);
var limitSaleHammer = (limitSaleHammer = document.getElementById('limit-sale')) && new Hammer(limitSaleHammer);
var appUrl = $('input[name="limitCodeUrl"]').val();
var dialog = require('../../me/dialog');
... ... @@ -80,7 +81,7 @@ if (goodsDiscountHammer && $discountFolder.children().length > 0) {
});
}
limitSaleHammer ? limitSaleHammer.on('tap', function(e) {
limitSaleHammer && limitSaleHammer.on('tap', function(e) {
e.srcEvent.stopPropagation();
dialog.showDialog({
dialogText: '进入有货APP尖货频道分享\n以获取限购码',
... ... @@ -88,7 +89,7 @@ limitSaleHammer ? limitSaleHammer.on('tap', function(e) {
rightBtnText: '打开Yoho!Buy有货APP'
}
}, function() {
console.log('111');
window.location.href = appUrl;
}, undefined, true);
$('.dialog-wrapper').off('touchstart').on('touchstart', function(e) {
... ... @@ -97,7 +98,7 @@ limitSaleHammer ? limitSaleHammer.on('tap', function(e) {
dialog.hideDialog();
}
});
}) : null;
});
require('./desc');
require('./comments-consults');
... ...
... ... @@ -56,9 +56,6 @@
<button class="got-limit-sale">已获限购码</button>
{{/if}}
{{/noLimitGoodsBtn}}
{{!--
<button class="got-limit-sale">已获限购码</button>
}}
{{#if periodOfMarket}}
<div class="periodOfMarket">
... ...