// 判断当前浏览器是PC端还是移动端
// true:移动端 false:PC端
export const isMobile = (() => {
let sUserAgent = navigator.userAgent.toLowerCase()
let bIsMobile = /AppleWebKit.*Mobile/i.test(navigator.userAgent)
let bIsIpad = sUserAgent.match(/ipad/i) !== null
let bIsIphoneOs = sUserAgent.match(/iphone os/i) !== null
let bIsMidp = sUserAgent.match(/midp/i) !== null
let bIsUc7 = sUserAgent.match(/rv:1.2.3.4/i) !== null
let bIsUc = sUserAgent.match(/ucbrowser/i) !== null
let bIsAndroid = sUserAgent.match(/android/i) !== null
let bIsCE = sUserAgent.match(/windows ce/i) !== null
let bIsWM = sUserAgent.match(/windows mobile/i) !== null
if (
bIsMobile ||
bIsIpad ||
bIsIphoneOs ||
bIsMidp ||
bIsUc7 ||
bIsUc ||
bIsAndroid ||
bIsCE ||
bIsWM
) {
return true
} else {
return false
}
})()