Authored by 梁志锋

限购商品详情 跳转APP

@@ -82,6 +82,7 @@ if (goodsDiscountHammer && $discountFolder.children().length > 0) { @@ -82,6 +82,7 @@ if (goodsDiscountHammer && $discountFolder.children().length > 0) {
82 82
83 $('#limit-sale').on('touchend', function(e) { 83 $('#limit-sale').on('touchend', function(e) {
84 var loginUrl = $('#loginUrl').val(), 84 var loginUrl = $('#loginUrl').val(),
  85 + time,
85 ifr; 86 ifr;
86 87
87 e.stopPropagation(); 88 e.stopPropagation();
@@ -95,15 +96,19 @@ $('#limit-sale').on('touchend', function(e) { @@ -95,15 +96,19 @@ $('#limit-sale').on('touchend', function(e) {
95 rightBtnText: '打开Yoho!Buy有货APP' 96 rightBtnText: '打开Yoho!Buy有货APP'
96 } 97 }
97 }, function() { 98 }, function() {
98 - ifr = document.createElement('iframe');  
99 - ifr.src = appUrl;  
100 - ifr.style.display = 'none';  
101 - document.body.appendChild(ifr);  
102 - window.location.href = appUrl;  
103 - window.setTimeout(function(){  
104 - document.body.removeChild(ifr); 99 + ifr = document.createElement('iframe');
  100 + ifr.src = appUrl;
  101 + ifr.style.display = 'none';
  102 + document.body.appendChild(ifr);
  103 + window.location.href = appUrl;
  104 +
  105 + time = Date.now();
  106 + window.setTimeout(function() {
  107 + document.body.removeChild(ifr);
  108 + if (Date.now()- time < 3200) {
105 window.location.href = 'http://a.app.qq.com/o/simple.jsp?pkgname=com.yoho'; 109 window.location.href = 'http://a.app.qq.com/o/simple.jsp?pkgname=com.yoho';
106 - },3000); 110 + }
  111 + }, 3000);
107 112
108 }, undefined, true); 113 }, undefined, true);
109 114