Authored by ccbikai(👎🏻🍜)

延迟上报时间

@@ -13,7 +13,7 @@ const iOSVersion = parseInt((u.match(/OS (\d+)_(\d+)_?(\d+)?/i) || [])[1], 10); @@ -13,7 +13,7 @@ const iOSVersion = parseInt((u.match(/OS (\d+)_(\d+)_?(\d+)?/i) || [])[1], 10);
13 13
14 const nodownload = document.getElementById('no-download'); // 页面不需要下载 14 const nodownload = document.getElementById('no-download'); // 页面不需要下载
15 const urlBlacklist = ['m.yohobuy.com/brands', 'm.yohobuy.com/passport']; 15 const urlBlacklist = ['m.yohobuy.com/brands', 'm.yohobuy.com/passport'];
16 -const blackCheck = urlBlacklist.some(function (url) { 16 +const blackCheck = urlBlacklist.some(function(url) {
17 return new RegExp(url, 'i').test(location.href); 17 return new RegExp(url, 'i').test(location.href);
18 }); 18 });
19 19
@@ -40,6 +40,7 @@ if (canOpenApp()) { @@ -40,6 +40,7 @@ if (canOpenApp()) {
40 let appPath = getAppPath(); 40 let appPath = getAppPath();
41 let ifr; 41 let ifr;
42 42
  43 + setTimeout(function() {
43 if (window._yas && window._yas.sendCustomInfo) { 44 if (window._yas && window._yas.sendCustomInfo) {
44 window._yas.sendCustomInfo({ 45 window._yas.sendCustomInfo({
45 op: 'YB_H5_AWAKE_APP', 46 op: 'YB_H5_AWAKE_APP',
@@ -53,6 +54,7 @@ if (canOpenApp()) { @@ -53,6 +54,7 @@ if (canOpenApp()) {
53 if (window._hmt && window._hmt.push) { 54 if (window._hmt && window._hmt.push) {
54 window._hmt.push(['_trackEvent', 'H5唤起APP', isiOS ? 'Apple' : 'Android', document.title, location.href]); 55 window._hmt.push(['_trackEvent', 'H5唤起APP', isiOS ? 'Apple' : 'Android', document.title, location.href]);
55 } 56 }
  57 + }, 2000);
56 58
57 if (isiOS) { 59 if (isiOS) {
58 window.location.href = appPath; 60 window.location.href = appPath;