|
@@ -301,10 +301,12 @@ Page({
|
|
|
|
|
|
///获取电量
|
|
///获取电量
|
|
else if (payloadType === "battery" && other) {
|
|
else if (payloadType === "battery" && other) {
|
|
- var battery = lexin_message.getDeviceInfo(other.battery);
|
|
|
|
- that.setData({
|
|
|
|
- battery: battery,
|
|
|
|
- });
|
|
|
|
|
|
+ if (other.battery) {
|
|
|
|
+ var battery = lexin_message.getBattery(other.battery);
|
|
|
|
+ that.setData({
|
|
|
|
+ battery: battery,
|
|
|
|
+ });
|
|
|
|
+ }
|
|
}
|
|
}
|
|
|
|
|
|
///获取播放状态
|
|
///获取播放状态
|
|
@@ -824,10 +826,13 @@ Page({
|
|
// 接收设备当前信息
|
|
// 接收设备当前信息
|
|
that.getchannelData(other.ProdModel);
|
|
that.getchannelData(other.ProdModel);
|
|
// 电量
|
|
// 电量
|
|
- var battery = lexin_message.getDeviceInfo(other.Power);
|
|
|
|
- that.setData({
|
|
|
|
- battery: battery,
|
|
|
|
- })
|
|
|
|
|
|
+ if (other.Power) {
|
|
|
|
+ var battery = lexin_message.getBattery(other.Power);
|
|
|
|
+ that.setData({
|
|
|
|
+ battery: battery,
|
|
|
|
+ });
|
|
|
|
+ }
|
|
|
|
+
|
|
// 当前设备木有设置定时
|
|
// 当前设备木有设置定时
|
|
that.setData({
|
|
that.setData({
|
|
isSetWake: false,
|
|
isSetWake: false,
|