if(/Android|webOS|iPhone|iPod|BlackBerry/i.test(navigator.userAgent)) {
    console.log('俺是移动端')
} else {
    console.log('俺是PC端')
}