Commit e362e5e5 authored by Sky's avatar Sky

修改部分场合重新开始训练时,tab定位不对的bug,删除训练数据页面的常亮设置

parent 69a7f454
...@@ -2,8 +2,6 @@ import brightness from '@system.brightness' //保持屏幕常亮 ...@@ -2,8 +2,6 @@ import brightness from '@system.brightness' //保持屏幕常亮
import app from '@system.app' //右滑退出 import app from '@system.app' //右滑退出
import router from '@system.router' //页面跳转 import router from '@system.router' //页面跳转
var timer;
export default { export default {
data: { data: {
acCalorie: "0", //卡路里 acCalorie: "0", //卡路里
...@@ -21,18 +19,7 @@ export default { ...@@ -21,18 +19,7 @@ export default {
_this.averHeartRate = _this.endAverHeartRate; _this.averHeartRate = _this.endAverHeartRate;
_this.maxHeartRate = _this.endMaxHeartRate; _this.maxHeartRate = _this.endMaxHeartRate;
}, },
onShow() {
let _this = this;
//保持屏幕常亮
_this.keepScreenOn();
timer = setInterval(function () {
_this.keepScreenOn();
},2 * 60 * 1000);
},
onDestroy() { onDestroy() {
if (timer != null) {
clearInterval(timer);
}
//取消接收手机侧第三方应用发过来的消息 //取消接收手机侧第三方应用发过来的消息
FeatureAbility.unsubscribeMsg(); FeatureAbility.unsubscribeMsg();
}, },
...@@ -50,19 +37,6 @@ export default { ...@@ -50,19 +37,6 @@ export default {
} }
}, },
/**
*保持屏幕常亮
*/
keepScreenOn() {
brightness.setKeepScreenOn({
keepScreenOn: true,
success: function () {
},
fail: function (data, code) {
}
})
},
/** /**
*获取客户端短消息 *获取客户端短消息
*/ */
......
...@@ -162,6 +162,7 @@ export default { ...@@ -162,6 +162,7 @@ export default {
switch (msg.eventFlg) { switch (msg.eventFlg) {
case "0": //训练准备 case "0": //训练准备
_this.page = "0"; _this.page = "0";
_this.tabIndex = "0";
break; break;
case "1": //训练准备后的倒计时 case "1": //训练准备后的倒计时
_this.countdownT = model.countdownT; _this.countdownT = model.countdownT;
......
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