● 获取系统信息getSystemInfo

分类:系统

是否支持H5:支持

参数
Object object

参数名 类型 默认值 必填 说明
success function 接口调用成功的回调函数
fail function 接口调用失败的回调函数
complete function 接口调用结束的回调函数(接口调用成功、失败都会执行)
object.success 回调函数
参数

Object res

属性 类型 说明
brand string 设备品牌
model string 设备型号
platform string 客户端平台
pixelRatio number 设备像素比
screenWidth number 屏幕宽度,单位px
screenHeight number 屏幕高度,单位px
windowWidth number 可使用窗口宽度,单位px
windowHeight number 可使用窗口高度,单位px
statusBarHeight number 状态栏的高度,单位px
language number 微信设置的语言
version string 微信版本号
system string 操作系统及版本
platform string 客户端平台(android、mac)
SDKVersion string 客户端基础库版本
channel string 渠道号
scheme string scheme
deviceId string 设备ID
appId string 小程序ID
errMsg string 错误信息

调用示例

原生
wx.getSystemInfo({
    success: function (res){
        console.log(res)
    }
})
H5
PAMINA.call('getSystemInfo',  res => {
    console.log(res)
}, e => {
    console.log(e)
})
小程序团队 © 2020-2021 all right reserved,powered by Gitbook文件修订时间: 2026-01-05 11:12:01

results matching ""

    No results matching ""