Authored by 梁志锋

限购商品详情 跳转APP

... ... @@ -18,8 +18,6 @@ var goodsDiscountEl = document.getElementById('goodsDiscount'),
var $cart = $('.cart-bar');
var limitSaleHammer = (limitSaleHammer = document.getElementById('limit-sale')) && new Hammer(limitSaleHammer);
var appUrl = $('input[name="limitCodeUrl"]').val();
var dialog = require('../../me/dialog');
... ... @@ -84,6 +82,7 @@ if (goodsDiscountHammer && $discountFolder.children().length > 0) {
$('#limit-sale').on('touchend', function(e) {
var loginUrl = $('#loginUrl').val(),
time,
ifr;
e.stopPropagation();
... ... @@ -102,10 +101,14 @@ $('#limit-sale').on('touchend', function(e) {
ifr.style.display = 'none';
document.body.appendChild(ifr);
window.location.href = appUrl;
window.setTimeout(function(){
time = Date.now();
window.setTimeout(function() {
document.body.removeChild(ifr);
if (Date.now()- time < 3200) {
window.location.href = 'http://a.app.qq.com/o/simple.jsp?pkgname=com.yoho';
},3000);
}
}, 3000);
}, undefined, true);
... ...