...
|
...
|
@@ -13,7 +13,7 @@ const iOSVersion = parseInt((u.match(/OS (\d+)_(\d+)_?(\d+)?/i) || [])[1], 10); |
|
|
|
|
|
const nodownload = document.getElementById('no-download'); // 页面不需要下载
|
|
|
const urlBlacklist = ['m.yohobuy.com/brands', 'm.yohobuy.com/passport'];
|
|
|
const blackCheck = urlBlacklist.some(function (url) {
|
|
|
const blackCheck = urlBlacklist.some(function(url) {
|
|
|
return new RegExp(url, 'i').test(location.href);
|
|
|
});
|
|
|
|
...
|
...
|
@@ -40,19 +40,21 @@ if (canOpenApp()) { |
|
|
let appPath = getAppPath();
|
|
|
let ifr;
|
|
|
|
|
|
if (window._yas && window._yas.sendCustomInfo) {
|
|
|
window._yas.sendCustomInfo({
|
|
|
op: 'YB_H5_AWAKE_APP',
|
|
|
param: JSON.stringify({
|
|
|
PAGE_NAME: encodeURIComponent(document.title),
|
|
|
PAGE_URL: encodeURIComponent(location.href)
|
|
|
})
|
|
|
}, true);
|
|
|
}
|
|
|
setTimeout(function() {
|
|
|
if (window._yas && window._yas.sendCustomInfo) {
|
|
|
window._yas.sendCustomInfo({
|
|
|
op: 'YB_H5_AWAKE_APP',
|
|
|
param: JSON.stringify({
|
|
|
PAGE_NAME: encodeURIComponent(document.title),
|
|
|
PAGE_URL: encodeURIComponent(location.href)
|
|
|
})
|
|
|
}, true);
|
|
|
}
|
|
|
|
|
|
if (window._hmt && window._hmt.push) {
|
|
|
window._hmt.push(['_trackEvent', 'H5唤起APP', isiOS ? 'Apple' : 'Android', document.title, location.href]);
|
|
|
}
|
|
|
if (window._hmt && window._hmt.push) {
|
|
|
window._hmt.push(['_trackEvent', 'H5唤起APP', isiOS ? 'Apple' : 'Android', document.title, location.href]);
|
|
|
}
|
|
|
}, 2000);
|
|
|
|
|
|
if (isiOS) {
|
|
|
window.location.href = appPath;
|
...
|
...
|
|