getBatteryInfo 获取手机电量
getBatteryInfo ^6.8
获取手机电量
#请求参数
N/A
#接口调用示例
this.$bridge
.getBatteryInfo()
.then(res => {
this.$alert(res)
})
.catch(err => {
// 错误处理
this.$toast(err)
})
#返回参数
- 成功时返回
| Prop | Type | Value |
|---|---|---|
level |
Number |
[1-100] |
isCharging |
Boolean |
`[ true |
#返回示例
{
"level": 48,
"isCharging": false
}
浙公网安备 33010602011771号