设备
# 方法列表
方法名 | 说明 | 参数 | 返回值 |
---|---|---|---|
$AsIsMobileDevice() | 判断是移动还是PC设备 | 无 | String类型(mobile/desktop) |
$AsIsAppleMobileDevice() | 判断是否是苹果还是安卓移动设备 | 无 | Boolean类型 |
$AsIsAndroidMobileDevice() | 判断是否是安卓移动设备 | 无 | Boolean类型 |
$AsGetOsType() | 判断是Windows还是Mac系统 | 无 | String类型(windows/mac) |
$AsGetDeviceType() | 判断设备类型 | 无 | String类型(Android/iOS/Windows Phone/Browser) |
$AsGetExplorerInfo() | 获取浏览器型号和版本 | 无 | 版本详情 |
$AsIsPCBroswer() | 检测是否为PC端浏览器模式 | 无 | Boolean类型 |
$AsGetScreenOrientation() | 判断设备方向 | 无 | String类型(landscape/vertical/unknown) |
# 简单示例
let flag1=this.$AsIsMobileDevice()
let flag2=this.$AsIsAppleMobileDevice()
let flag3=this.$AsIsAndroidMobileDevice()
let flag4=this.$AsGetOsType()
let flag5=this.$AsGetExplorerInfo()
let flag6=this.$AsIsPCBroswer()
let flag7=this.$AsGetDeviceType()
let flag8=this.$AsGetScreenOrientation()