Commit 99b03801 authored by Sky's avatar Sky

bug修改

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