# getTemperatureUnity
查询当前温度单位
# 调用方式
getTemperatureUnity(params = {})
1
返回 Promise,使用 then/catch 或 await 处理结果。 可省略参数对象,此时传入空对象;不额外接收位置形式的成功/失败回调。
# 请求参数
参数对象字段由宿主约定;调用签名见上方。
# 接口调用示例
this.$bridge.getTemperatureUnity().then(res => {
// res.unit: 0 ℃, 1 ℉
this.$log(res.unit)
})
1
2
3
4
2
3
4
# 返回参数
- 返回温度单位:0=℃,1=℉