Commit 79c7247b authored by Sky's avatar Sky

onshow时同步数据及状态

parent 9f2e686d
......@@ -62,14 +62,18 @@ export default {
timer = setInterval(function () {
_this.keepScreenOn();
},2 * 60 * 1000);
//重新回到训练界面时,同步一下训练数据及暂停播放状态
_this.sendMsg({
"eventFlg": "8",
});
},
onHide() {
this.stopFlg = true;
this.tabIndex = 1;
//消息发送时,手机端可能无法接受消息,所以在onShow时,需要重新同步
this.sendMsg({
"eventFlg": "3",
})
console.log('index page onHide()');
},
onDestroy() {
//发送页面销毁时间
......@@ -238,6 +242,7 @@ export default {
case "14": //训练总时长
_this.acCalorie = model.acCalorie ? model.acCalorie : '--';
_this.fitDuration = model.fitDuration;
_this.stopFlg = model.stopFlag; //同步状态
break;
case "15": //离开或者返回训练
if (model.rollbackStop == '0') {
......
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