Commit 99b03801 authored by Sky's avatar Sky

bug修改

parent d8691416
......@@ -13,11 +13,18 @@ export default {
averHeartRate: "", //平均心率
maxHeartRate: "", //最高心率
},
onInit() {
p2pClient.setPeerPkgName("com.sportq.fit");
p2pClient.setPeerFingerPrint("B1B788A1BBD5F459BC641DA8CE690EA065C96957F58E883764982B5C46E53E06");
},
onReady() {
let _this = this;
//获取客户端信息
_this.getMsg();
},
onShow() {
let _this = this;
//更新页面数据
......@@ -34,6 +41,7 @@ export default {
}
})
},
onDestroy() {
//取消接收手机侧第三方应用发过来的消息
console.error("end--onDestroy:unregisterReceiver")
......@@ -42,9 +50,9 @@ export default {
},
});
},
start(msg) {
let _this = this;
let model = msg.acModel;
//训练完成页面,只接收重新开始训练事件
if (msg.eventFlg == "17") {
router.replace({
......
......@@ -194,11 +194,11 @@
.train-new-title {
font-size: 38px;
height: 40px;
line-height: 40px;
margin-top: 60px;
width: 350px;
color: #FFFFFF;
text-align: center;
line-hight: 40px;
}
.train-time {
justify-content: center;
......
......@@ -37,6 +37,9 @@ export default {
showPrivacy: true, //显示隐私权限页面
},
onInit() {
if (app.setSwipeToDismiss != undefined) {
app.setSwipeToDismiss(true);
}
p2pClient.setPeerPkgName("com.sportq.fit");
p2pClient.setPeerFingerPrint("B1B788A1BBD5F459BC641DA8CE690EA065C96957F58E883764982B5C46E53E06");
},
......@@ -65,7 +68,7 @@ export default {
if (_this.isJumpLoginPage) {
_this.page = "11";
}
},1500);
}, 1500);
},
onShow() {
let _this = this;
......@@ -80,7 +83,7 @@ export default {
_this.keepScreenOn();
timer = setInterval(function () {
_this.keepScreenOn();
},2 * 60 * 1000);
}, 2 * 60 * 1000);
}
}
},
......@@ -127,7 +130,7 @@ export default {
_this.keepScreenOn();
timer = setInterval(function () {
_this.keepScreenOn();
},2 * 60 * 1000);
}, 2 * 60 * 1000);
}
//数据重置
_this.initData();
......@@ -172,7 +175,7 @@ export default {
if (!_this.dataPageShow) {
_this.dataPageShow = true;
}
_this.tabIndex = 0;
_this.tabIndex = 1;
_this.stopFlg = true;
//训练数据页面显示的实际数据
if (_this.lastPage != "") { //有可能是手机离开页面的15事件,手表端没有收到,所以导致lastpage没有值,这时候按训练中的页面算
......@@ -286,6 +289,8 @@ export default {
_this.acCalorie = model.acCalorie ? model.acCalorie : '--';
_this.fitDuration = model.fitDuration;
_this.stopFlg = model.stopFlag; //同步状态
_this.isLast = model.isLast;
_this.isFirst = model.isFirst;
break;
case "15": //离开或者返回训练
if (model.rollbackStop == '0') {
......@@ -647,7 +652,9 @@ export default {
*/
touchMove: function (e) {
if (e.direction == "right") {
if (!(this.dataPageShow && !this.showPrivacy)) {
app.terminate();
}
}
}
}
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