app内适配测试 review by bevishuang
Showing
3 changed files
with
8 additions
and
1 deletions
@@ -36,6 +36,8 @@ function iPhoneXHandler(innerHeight) { | @@ -36,6 +36,8 @@ function iPhoneXHandler(innerHeight) { | ||
36 | 36 | ||
37 | if (yoho.isWechat && window.history.length === 1) { | 37 | if (yoho.isWechat && window.history.length === 1) { |
38 | $yohoBody.addClass('iphonex-series'); | 38 | $yohoBody.addClass('iphonex-series'); |
39 | + } else if (yoho.isApp) { | ||
40 | + $yohoBody.addClass('iphonex-series'); | ||
39 | } else { | 41 | } else { |
40 | if (innerHeight < currentInnerHeight) { | 42 | if (innerHeight < currentInnerHeight) { |
41 | $yohoBody.addClass('iphonex-series'); | 43 | $yohoBody.addClass('iphonex-series'); |
@@ -34,7 +34,6 @@ if (!$appLink.length) { | @@ -34,7 +34,6 @@ if (!$appLink.length) { | ||
34 | $appLink = $('#yoho-app-link'); | 34 | $appLink = $('#yoho-app-link'); |
35 | } | 35 | } |
36 | const isiPhoneXSeries = () => { | 36 | const isiPhoneXSeries = () => { |
37 | - console.log(navigator.userAgent); | ||
38 | let isiOS = /\(i[^;]+;( U;)? CPU.+Mac OS X/i.test(navigator.userAgent || ''); | 37 | let isiOS = /\(i[^;]+;( U;)? CPU.+Mac OS X/i.test(navigator.userAgent || ''); |
39 | 38 | ||
40 | if (!window || !isiOS) { | 39 | if (!window || !isiOS) { |
-
Please register or login to post a comment