常用方法:获取user-agent,如果user-agent中包含Mobile,则为移动端 其它方法: 'ontouchstart' in document 如果返回true,则设备为移动端,否则为pc端