Skip to content

getPhoneInfo 获取设备信息

接口说明

获取手机设备信息

使用说明

是否需要鉴权是否支持Android是否支持IOS是否支持PC

返回参数

参数参数类型说明
screenWidthNumber屏幕宽度
screenHeightNumber屏幕高度
brandString手机品牌
modelString手机型号
versionString版本
netInfoString网络类型: wifi、2g、3g、4g、unknown、none,none表示离线
operatorTypeString运营商信息
statusBarHeightString状态栏高度

用法示例

javascript
SZHN_HZT_SDK.getPhoneInfo().then(res => {
    console.log(res)
}).catch(err => {
    console.error(err)
})

返回示例

javascript
{
    "netInfo":"wifi",
    "operatorType":"中国联通",
    "model":"iPhone 12",
    "screenWidth":390,
    "screenHeight":844,
    "brand":"Apple",
    "version":"2.14.0",
    "statusBarHeight":47
}