# Interface: GetSystemInfoRes

GetSystemInfoRes()

获取系统信息 返回值

# Properties

# SDKVersion

SDKVersion: string

Inherited from SystemInfo.SDKVersion

客户端基础库版本

Returns: string


# albumAuthorized

albumAuthorized: boolean

Inherited from SystemInfo.albumAuthorized

允许微信使用相册的开关(仅 iOS 有效)

Returns: boolean


# benchmarkLevel

benchmarkLevel: number

Inherited from SystemInfo.benchmarkLevel

设备性能等级(仅 Android 小游戏)

description 取值为:

  • -2 或 0:该设备无法运行小游戏;
  • -1:性能未知;
  • =1:设备性能值,该值越高,设备性能越好,目前最高不到 50;

Returns: number


# bluetoothEnabled

bluetoothEnabled: boolean

Inherited from SystemInfo.bluetoothEnabled

蓝牙的系统开关

Returns: boolean


# brand

brand: string

Inherited from SystemInfo.brand

设备品牌

Returns: string


# cameraAuthorized

cameraAuthorized: boolean

Inherited from SystemInfo.cameraAuthorized

允许微信使用摄像头的开关

Returns: boolean


# Optional cyminiMenuButtonPosition

cyminiMenuButtonPosition? : object

Inherited from SystemInfo.cyminiMenuButtonPosition

有乐菜单按钮的尺寸(仅有乐可用)

# Type declaration:

  • bottom: number

  • height: number

  • left: number

  • right: number

  • top: number

  • width: number

Returns: object

  • bottom: number

  • height: number

  • left: number

  • right: number

  • top: number

  • width: number


# errMsg

errMsg: string

Inherited from MogsRes.errMsg

API 调用成功/失败的消息

Returns: string


# fontSizeSetting

fontSizeSetting: number

Inherited from SystemInfo.fontSizeSetting

用户字体大小

description 单位为 px,以微信客户端「我-设置-通用-字体大小」中的设置为准。

Returns: number


# language

language: string

Inherited from SystemInfo.language

微信设置的语言

Returns: string


# locationAuthorized

locationAuthorized: boolean

Inherited from SystemInfo.locationAuthorized

允许微信使用定位的开关

Returns: boolean


# locationEnabled

locationEnabled: boolean

Inherited from SystemInfo.locationEnabled

地理位置的系统开关

Returns: boolean


# microphoneAuthorized

microphoneAuthorized: boolean

Inherited from SystemInfo.microphoneAuthorized

允许微信使用麦克风的开关

Returns: boolean


# model

model: string

Inherited from SystemInfo.model

设备型号

Returns: string


# notificationAlertAuthorized

notificationAlertAuthorized: boolean

Inherited from SystemInfo.notificationAlertAuthorized

允许微信通知带有提醒的开关(仅 iOS 有效)

Returns: boolean


# notificationAuthorized

notificationAuthorized: boolean

Inherited from SystemInfo.notificationAuthorized

允许微信通知的开关

Returns: boolean


# notificationBadgeAuthorized

notificationBadgeAuthorized: boolean

Inherited from SystemInfo.notificationBadgeAuthorized

允许微信通知带有标记的开关(仅 iOS 有效)

Returns: boolean


# notificationSoundAuthorized

notificationSoundAuthorized: boolean

Inherited from SystemInfo.notificationSoundAuthorized

允许微信通知带有声音的开关(仅 iOS 有效)

Returns: boolean


# pixelRatio

pixelRatio: number

Inherited from SystemInfo.pixelRatio

设备像素比

Returns: number


# platform

platform: string

Inherited from SystemInfo.platform

客户端平台

Returns: string


# safeArea

safeArea: SafeArea

Inherited from SystemInfo.safeArea

在竖屏正方向下的安全区域

Returns: SafeArea


# screenHeight

screenHeight: number

Inherited from SystemInfo.screenHeight

屏幕高度

description 单位为 px。

Returns: number


# screenWidth

screenWidth: number

Inherited from SystemInfo.screenWidth

屏幕宽度

description 单位为 px。

Returns: number


# statusBarHeight

statusBarHeight: number

Inherited from SystemInfo.statusBarHeight

状态栏的高度

description 单位为 px。

Returns: number


# system

system: string

Inherited from SystemInfo.system

操作系统及版本

Returns: string


# Optional theme

theme? : "light" | "dark"

Inherited from SystemInfo.theme

系统当前主题

description 取值为 'light' 或 'dark',全局配置 "darkmode": true 时才能获取,否则为 undefined(不支持小游戏)。

Returns: "light" | "dark"


# version

version: string

Inherited from SystemInfo.version

微信版本号

Returns: string


# wifiEnabled

wifiEnabled: boolean

Inherited from SystemInfo.wifiEnabled

Wi-Fi 的系统开关

Returns: boolean


# windowHeight

windowHeight: number

Inherited from SystemInfo.windowHeight

可使用窗口高度

description 单位为 px。

Returns: number


# windowWidth

windowWidth: number

Inherited from SystemInfo.windowWidth

可使用窗口宽度

description 单位为 px。

Returns: number