Commit 84e2256a authored by Sky's avatar Sky

获取心率删除无用数据

parent 89a4bcf7
......@@ -211,7 +211,7 @@ export default {
message: JSON.stringify(obj),
success: function () {
_this.sendFlg = false;
console.log('FA has been installed.');
console.log('sendMsg success.');
},
fail: function (data, code) {
_this.sendFlg = false;
......@@ -245,7 +245,6 @@ export default {
let _this = this;
FeatureAbility.subscribeMsg({
success: function (data) {
_this.sendErrMsg(data.message,"手表端接收到消息数据:");
_this.start(JSON.parse(data.message));
},
fail: function (data, code) {
......@@ -268,7 +267,7 @@ export default {
"errCode": code,
}),
success: function () {
console.log('FA has been installed.');
console.log('sendErrMsg success.');
},
fail: function (data, code) {
console.log('handing fail, message: ' + data + ', code: ' + code);
......@@ -284,13 +283,17 @@ export default {
let _this = this;
sensor.subscribeHeartRate({
success: function (data) {
_this.newHeartRate = data.heartRate;
_this.heartRateList.push(data.heartRate);
console.log('获取心率成功: ' + data.heartRate);
if (data.heartRate != 255) {
_this.newHeartRate = data.heartRate;
_this.heartRateList.push(data.heartRate);
console.log('获取心率成功: ' + data.heartRate);
} else {
_this.newHeartRate = "--";
}
_this.sendMsg({
"eventFlg": "0",
"rateCnt": data.heartRate
})
"rateCnt": _this.newHeartRate
});
},
fail: function (data, code) {
_this.newHeartRate = "--";
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment