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();
... ... @@ -97,15 +96,19 @@ $('#limit-sale').on('touchend', function(e) {
rightBtnText: '打开Yoho!Buy有货APP'
}
}, function() {
ifr = document.createElement('iframe');
ifr.src = appUrl;
ifr.style.display = 'none';
document.body.appendChild(ifr);
window.location.href = appUrl;
window.setTimeout(function(){
document.body.removeChild(ifr);
ifr = document.createElement('iframe');
ifr.src = appUrl;
ifr.style.display = 'none';
document.body.appendChild(ifr);
window.location.href = appUrl;
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);
... ...