my.getSystemInfo

Get system information.

Sample Code

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

Parameters

Property

Type

Required

Description

success

Function

No

Callback function upon call success

fail

Function

No

Callback function upon call failure

complete

Function

No

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

Property

Type

Description

model

String

Cellphone model

pixelRatio

Number

Device pixel ratio

windowWidth

Number

Window width

windowHeight

Number

Window height

language

String

The language set by the user in the app. If the app does not support the language setting, return the system language.

version

String

App version number

storage

String

Device disk capacity

currentBattery

String

Current battery percentage

system

String

System version

platform

String

System name: Android, iOS

titleBarHeight

Number

Title bar height

statusBarHeight

Number

Status bar height

screenWidth

Number

Screen width

screenHeight

Number

Screen height

brand

String

Cellphone brand

fontSizeSetting

Number

User setting font size

app

String

Current running client. The app value can refer to the following table.

App Value Reference Table

App

Value

TNG eWallet

tngd

GCash

gcash

DANA

dana

M-PESA

mpesa

PAYTM

paytm

AlipayCN

alipay

AlipayHK

alipayHK

AlipayMO

alipayMO

KAKAOTALK

kakaotalk

TrueMoney Wallet

tmn