my.getSystemInfo

Get system information

Sample Code

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

Parameters

PropertyType

Required

Description
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:

PropertyTypeDescription
modelStringCellphone model.
pixelRatioNumberDevice pixel ratio.
windowWidthNumberWindow width.
windowHeightNumberWindow height.
languageStringThe language set by the user in the app. If the app does not support the language setting, return the system 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. The app value can refer to the following table.

App Value Reference Table

AppValue
GCashgcash.