请扫码查看示例
# setScreenBrightness ^6.8
设置屏幕亮度
# 请求参数
Prop | Type | Value |
---|---|---|
value | Number | [0-1] |
# 参数代码示例
let params = { value: 0.5 }
1
# 接口调用示例
import bridge from '@minix-iot/etsbridge-sdk'
1
let params = { value: 0.5 }
bridge
.setScreenBrightness(params)
.then((res) => {
console.log(res)
})
.catch((err) => {
// 错误处理
console.log(err)
})
1
2
3
4
5
6
7
8
9
10
2
3
4
5
6
7
8
9
10
# 返回参数
- 成功时返回
Prop | Type | Value |
---|---|---|
code | Number | 0 |
msg | String | success |
- 失败时返回(value 为空或者没有)
Prop | Type | Value |
---|---|---|
code | Number | -2 |
msg | json 解析失败 |
# 返回示例
{
"code": 0,
"msg": "success"
}
1
2
3
4
5
6
2
3
4
5
6