Showing
2 changed files
with
10 additions
and
7 deletions
@@ -10,22 +10,24 @@ var isiOS = u.indexOf('os') > -1 || u.indexOf('iphone') > -1 || u.indexOf('mac') | @@ -10,22 +10,24 @@ var isiOS = u.indexOf('os') > -1 || u.indexOf('iphone') > -1 || u.indexOf('mac') | ||
10 | var appPath = url; | 10 | var appPath = url; |
11 | var ifr; | 11 | var ifr; |
12 | 12 | ||
13 | -if (isiOS) { | 13 | +setTimeout(function() { |
14 | + if (isiOS) { | ||
14 | window.location.href = appPath; | 15 | window.location.href = appPath; |
15 | -} else { | 16 | + } else { |
16 | ifr = document.createElement('iframe'); | 17 | ifr = document.createElement('iframe'); |
17 | ifr.src = appPath; | 18 | ifr.src = appPath; |
18 | ifr.style.display = 'none'; | 19 | ifr.style.display = 'none'; |
19 | document.body.appendChild(ifr); | 20 | document.body.appendChild(ifr); |
20 | -} | 21 | + } |
21 | 22 | ||
22 | -//1: 男生,2-女生,3-潮童,4-创意生活 | ||
23 | -var CHANNELS = { | 23 | + //1: 男生,2-女生,3-潮童,4-创意生活 |
24 | + var CHANNELS = { | ||
24 | boys: 1, | 25 | boys: 1, |
25 | girls: 2, | 26 | girls: 2, |
26 | kids: 3, | 27 | kids: 3, |
27 | lifestyle: 4 | 28 | lifestyle: 4 |
28 | -}; | 29 | + }; |
30 | +}, 500); | ||
29 | 31 | ||
30 | $('#download').click(function() { | 32 | $('#download').click(function() { |
31 | var url; | 33 | var url; |
@@ -42,7 +44,7 @@ $('#download').click(function() { | @@ -42,7 +44,7 @@ $('#download').click(function() { | ||
42 | }); | 44 | }); |
43 | 45 | ||
44 | // 上报 yas 数据 | 46 | // 上报 yas 数据 |
45 | - if (typeof _yas !=='undefined') { | 47 | + if (typeof _yas !== 'undefined') { |
46 | _yas.sendCustomInfo && _yas.sendCustomInfo({ | 48 | _yas.sendCustomInfo && _yas.sendCustomInfo({ |
47 | op: 'YB_DOWNLOAD_C', | 49 | op: 'YB_DOWNLOAD_C', |
48 | param: JSON.stringify({ | 50 | param: JSON.stringify({ |
-
Please register or login to post a comment