Showing
2 changed files
with
5 additions
and
3 deletions
@@ -45,7 +45,7 @@ var appInfo = { | @@ -45,7 +45,7 @@ var appInfo = { | ||
45 | apf: window.location.search.indexOf('app_version=') >= 0 ? 'Y' : 'N' | 45 | apf: window.location.search.indexOf('app_version=') >= 0 ? 'Y' : 'N' |
46 | }; | 46 | }; |
47 | 47 | ||
48 | -var isApp = navigator.userAgent.indexOf('app_version=') > -1 || window.location.search.indexOf('app_version=') > -1 || !!window.yohoInterface; | 48 | +var isApp = /yohobuy/i.test(navigator.userAgent) || /app_version=/i.test(window.location.search) || !!window.yohoInterface; |
49 | var isMobile = /(iPhone|Android|iPad|iPod|iOS)/i.test(navigator.userAgent); | 49 | var isMobile = /(iPhone|Android|iPad|iPod|iOS)/i.test(navigator.userAgent); |
50 | var isWechat = /micromessenger/i.test(navigator.userAgent); | 50 | var isWechat = /micromessenger/i.test(navigator.userAgent); |
51 | var ismyhbuy = /m\.yohobuy\.com/i.test(document.domain); | 51 | var ismyhbuy = /m\.yohobuy\.com/i.test(document.domain); |
@@ -374,7 +374,9 @@ function setUnionType() { | @@ -374,7 +374,9 @@ function setUnionType() { | ||
374 | for (var i = 0; i < aDom.length; i++) { | 374 | for (var i = 0; i < aDom.length; i++) { |
375 | var href = aDom[i].getAttribute('href') || ''; | 375 | var href = aDom[i].getAttribute('href') || ''; |
376 | 376 | ||
377 | - if (href.indexOf('union.yoho.cn/union/app-downloads.html') > -1) { | 377 | + if (href.indexOf('union.yoho.cn/union/downapp.html') > -1 |
378 | + || href.indexOf('union.yoho.cn/union/app-downloads.html') > -1 | ||
379 | + || href.indexOf('union.yoho.cn/union/ClickUnionRest/addUnion4Jump') > -1) { | ||
378 | if (mktc && href.indexOf('union_type') === -1) { | 380 | if (mktc && href.indexOf('union_type') === -1) { |
379 | href += '?union_type=' + mktc; | 381 | href += '?union_type=' + mktc; |
380 | aDom[i].setAttribute('href', href); | 382 | aDom[i].setAttribute('href', href); |
-
Please register or login to post a comment