判断是否为iphoneX
isIphoneX () {
let result = false
let u = navigator.userAgent
let isIos = !!u.match(/\(i[^;]+;( U;)? CPU.+Mac OS X/)
if (isIos) {
if (screen.height === 812 && screen.width === 375) {
result = true
}
}
return result
}
DO What You Want !
浙公网安备 33010602011771号