export function isPortrait () { if (!/ios|iphone|ipad|Macintosh/i.test(window.navigator.userAgent)) { // iphone 只会保留竖屏的宽高 return window.screen.width < window.screen.height } return (window.orientation === 180 || window.orientation === 0) }