my.getSystemInfo
Get system information.
Sample Code
copy
Page({
data: {
systemInfo: {}
},
getSystemInfoPage() {
my.getSystemInfo({
success: (res) => {
this.setData({
systemInfo: res
})
}
})
},
})
Parameters
Name | Type | Mandatory | 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:
Name | Type | Description | Lowest   version |
model | String | Cellphone model | - |
pixelRatio | Number | Device pixel ratio | - |
windowWidth | Number | Window width | - |
windowHeight | Number | Window height | - |
language | String | 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. | - |