my.getSystemInfo

Get system information.

Sample Code

copy
Page({
  data: {
    systemInfo: {}
  },
  getSystemInfoPage() {
    my.getSystemInfo({
      success: (res) => {
        this.setData({
          systemInfo: res
        })
      }
    })
  },
})

Parameters

NameTypeMandatoryDescription
successFunctionNoCallback function upon call success
failFunctionNoCallback function upon call failure
completeFunctionNoCallback function upon call completion (to be executed upon either call success or failure)

Success Callback Function

The incoming parameter is of the Object type with the following attributes:

NameTypeDescriptionLowest    version
modelStringCellphone model-
pixelRatioNumberDevice pixel ratio-
windowWidthNumberWindow width-
windowHeightNumberWindow height-
languageStringSystem language-
versionStringApp version number-
storageStringDevice disk capacity-
currentBatteryStringCurrent battery percentage-
systemStringSystem version-
platformStringSystem name: Android, iOS-
titleBarHeightNumberTitle bar height-
statusBarHeightNumberStatus bar height-
screenWidthNumberScreen width-
screenHeightNumberScreen height-
brandStringCellphone brand-
fontSizeSettingNumberUser setting font size-
appStringCurrent running client.-