<script>
//判断是否为iphone x系列
function isPhoneX2() {
    let need_fit = 0;
    let isIphone = /iphone/gi.test(window.navigator.userAgent); //匹配是否为iphone
    let windowW = window.screen.width; //分辨率宽
    let windowH = window.screen.height; //分辨率高
    let pixelRatio = window.devicePixelRatio; //像素比
    let isIPhoneX = isIphone && pixelRatio && pixelRatio === 3 && windowW === 375 && windowH === 812;
    let isIPhoneXSMax = isIphone && pixelRatio && pixelRatio === 3 && windowW === 414 && windowH === 896;
    let isIPhoneXR = isIphone && pixelRatio && pixelRatio === 2 && windowW === 414 && windowH === 896;
    
    if (isIPhoneX || isIPhoneXSMax || isIPhoneXR) {
        need_fit = 1;
    }
    return need_fit;
}
$(function () { 
    //适配底部导航
    if ($("#footbar").length > 0) {
        let $fit_phonex = isPhoneX2();
        if ($fit_phonex == '1') {
            $("#footbar").css('padding-bottom', '34px');
        }
    }
});
</script>