Commit 4f5b8209 authored by Sky's avatar Sky

修改bug

parent 84e2256a
...@@ -9,169 +9,184 @@ ...@@ -9,169 +9,184 @@
flex-direction: column; flex-direction: column;
} }
/*准备开始*/ /*准备开始*/
.logo{ .logo {
width: 230px; width: 230px;
height: 129px; height: 129px;
} }
.start{ .start {
width: 454px; width: 454px;
height: 454px; height: 454px;
justify-content: center; justify-content: center;
align-items: center; align-items: center;
} }
.start-text{ .start-text {
font-size: 38px; font-size: 38px;
text-align: center; text-align: center;
} }
/* 标题 */ /* 标题 */
.title{ .title {
width: 262px; width: 262px;
height: 90px; height: 120px;
} }
.text{ .text {
color: #ffffff; color: #ffffff;
font-size: 38px; font-size: 38px;
width: 262px; width: 262px;
text-align: center; text-align: center;
justify-content: center; justify-content: center;
} }
/* 标题 */
.install {
width: 280px;
height: 120px;
align-items: center;
justify-content: center;
}
/*对端应用未安装*/
.installText {
color: #ffffff;
font-size: 38px;
width: 280px;
text-align: center;
justify-content: center;
}
/*倒计时*/ /*倒计时*/
.count-down{ .count-down {
width: 350px; width: 350px;
text-align: center; text-align: center;
font-size: 38px; font-size: 38px;
justify-content: center; justify-content: center;
color:#FFD208; color: #FFD208;
} }
.count-down-num{ .count-down-num {
width: 60px; width: 60px;
height: 170px; height: 170px;
} }
/* 动作预览 */ /* 动作预览 */
.train-view{ .train-view {
width: 454px; width: 454px;
height: 454px; height: 454px;
flex-direction: column; flex-direction: column;
align-items: center; align-items: center;
} }
.train-page-title,.train-pape-num-box{ .train-page-title,.train-pape-num-box {
font-size: 38px; font-size: 38px;
height: 130px; height: 130px;
margin-top:60px; margin-top: 60px;
width: 350px; width: 350px;
color:#FFFFFF; color: #FFFFFF;
text-align: center; text-align: center;
justify-content: center; justify-content: center;
} }
.train-pape-num{ .train-pape-num {
font-size: 38px; font-size: 38px;
} }
.train-pape-num-f{ .train-pape-num-f {
font-size: 30px; font-size: 30px;
margin-top: 8px; margin-top: 8px;
} }
.train-pape-num-o{ .train-pape-num-o {
color:#FFD208; color: #FFD208;
font-size: 38px; font-size: 38px;
} }
.train-view-title{ .train-view-title {
width: 350px; width: 350px;
color:#A8A8A8; color: #A8A8A8;
text-align: center; text-align: center;
text-overflow: ellipsis; text-overflow: ellipsis;
} }
.train-view-progress-line{ .train-view-progress-line {
width: 350px; width: 350px;
height: 10px; height: 10px;
border-radius: 10px; border-radius: 10px;
background-color:rgba(255,255,255,0.15); background-color: rgba(255, 255, 255, 0.15);
margin-top:60px; margin-top: 60px;
} }
.train-view-progress-new{ .train-view-progress-new {
width: 100px; width: 100px;
height: 10px; height: 10px;
border-radius: 10px; border-radius: 10px;
background-color:#FFD208; background-color: #FFD208;
} }
.train-num{ .train-num {
width: 350px; width: 350px;
height: 54px; height: 54px;
margin-top:26px; margin-top: 26px;
} }
.train-heartbeat,.train-calorie{ .train-heartbeat,.train-calorie {
width: 175px; width: 175px;
height: 54px; height: 54px;
justify-content: center; justify-content: center;
align-items: center; align-items: center;
} }
.train-num-icon{ .train-num-icon {
width: 54px; width: 54px;
height: 54px; height: 54px;
margin-right: 16px; margin-right: 16px;
} }
.train-num-text{ .train-num-text {
width: 105px; width: 105px;
height: 42px; height: 42px;
justify-content: center; justify-content: center;
align-items: center; align-items: center;
font-size: 38px; font-size: 38px;
} }
.train-num-text-no{ .train-num-text-no {
color: #C8C8C8; color: #C8C8C8;
} }
.select{ .select {
width: 454px; width: 454px;
height:36px; height: 36px;
justify-content: center; justify-content: center;
} }
.select-item{ .select-item {
width: 12px; width: 12px;
height: 12px; height: 12px;
border-radius: 12px; border-radius: 12px;
margin-left:6px; margin-left: 6px;
margin-right:6px; margin-right: 6px;
background-color: #3B3B3B; background-color: #3B3B3B;
} }
.select-item-active{ .select-item-active {
background-color: #FFFFFF; background-color: #FFFFFF;
} }
/**已训练**/ /**已训练**/
.train-new-title{ .train-new-title {
font-size: 38px; font-size: 38px;
height: 38px; height: 38px;
margin-top:60px; margin-top: 60px;
width: 350px; width: 350px;
color:#FFFFFF; color: #FFFFFF;
text-align: center; text-align: center;
} }
.train-time{ .train-time {
justify-content: center; justify-content: center;
align-items: center; align-items: center;
height: 130px; height: 130px;
margin-top:26px; margin-top: 26px;
font-size: 38px; font-size: 38px;
} }
.train-time-icon{ .train-time-icon {
width: 46px; width: 46px;
height: 130px; height: 130px;
} }
.train-time-icon-d{ .train-time-icon-d {
width: 26px; width: 26px;
height: 130px; height: 130px;
} }
.train-tool{ .train-tool {
width: 454px; width: 454px;
height: 120px; height: 120px;
justify-content: center; justify-content: center;
align-items: center; align-items: center;
} }
.train-tool-icon{ .train-tool-icon {
width: 80px; width: 80px;
height: 80px; height: 80px;
} }
.train-play-icon{ .train-play-icon {
width: 120px; width: 120px;
height: 120px; height: 120px;
margin-left: 35px; margin-left: 35px;
...@@ -179,41 +194,41 @@ ...@@ -179,41 +194,41 @@
} }
/**切出**/ /**切出**/
.train-quit{ .train-quit {
width: 454px; width: 454px;
height: 454px; height: 454px;
flex-direction:column; flex-direction: column;
align-items: center; align-items: center;
justify-content:center; justify-content: center;
} }
.train-quit-icon{ .train-quit-icon {
width: 90px; width: 90px;
height: 160px; height: 160px;
} }
.train-quit-logo-icon{ .train-quit-logo-icon {
width: 120px; width: 120px;
height: 68px; height: 68px;
} }
.train-quit-text-box{ .train-quit-text-box {
width: 350px; width: 350px;
height: 84px; height: 84px;
margin-top: 32px; margin-top: 32px;
} }
.train-quit-text{ .train-quit-text {
width: 350px; width: 350px;
text-align: center; text-align: center;
} }
/*暂停倒计时*/ /*暂停倒计时*/
.train-down{ .train-down {
width: 454px; width: 454px;
height: 454px; height: 454px;
flex-direction:column; flex-direction: column;
align-items: center; align-items: center;
justify-content:center; justify-content: center;
} }
.train-down-text{ .train-down-text {
color:#FFFFFF; color: #FFFFFF;
width: 59px; width: 59px;
height: 152px; height: 152px;
font-size: 152px; font-size: 152px;
...@@ -231,12 +246,12 @@ ...@@ -231,12 +246,12 @@
} }
/*完成训练*/ /*完成训练*/
.train-end{ .train-end {
width: 454px; width: 454px;
height: 454px; height: 454px;
flex-direction: column; flex-direction: column;
} }
.train-end-tt{ .train-end-tt {
height: 103px; height: 103px;
width: 454px; width: 454px;
justify-content: center; justify-content: center;
...@@ -244,74 +259,74 @@ ...@@ -244,74 +259,74 @@
flex-direction: column; flex-direction: column;
margin-top: 40px; margin-top: 40px;
} }
.train-end-tt-text{ .train-end-tt-text {
font-size: 38px; font-size: 38px;
margin-bottom: 10px; margin-bottom: 10px;
} }
.train-end-time{ .train-end-time {
font-size: 30px; font-size: 30px;
color: #A8A8A8; color: #A8A8A8;
} }
.train-end-list{ .train-end-list {
align-items: flex-end; align-items: flex-end;
width: 454px; width: 454px;
height:200px; height: 200px;
flex-direction: column; flex-direction: column;
margin-top: 20px; margin-top: 20px;
} }
.train-end-list-item{ .train-end-list-item {
width: 450px; width: 450px;
height: 38px; height: 38px;
justify-content: center; justify-content: center;
margin-bottom: 30px; margin-bottom: 30px;
} }
.train-end-label{ .train-end-label {
height: 38px; height: 38px;
width: 147px; width: 147px;
color: #A8A8A8; color: #A8A8A8;
font-size: 30px; font-size: 30px;
margin-top: 6px; margin-top: 6px;
} }
.train-end-num{ .train-end-num {
width: 104px; width: 104px;
margin-right: 16px; margin-right: 16px;
font-size: 38px; font-size: 38px;
text-align: right; text-align: right;
} }
.train-end-unit{ .train-end-unit {
width: 83px; width: 83px;
color: #A8A8A8; color: #A8A8A8;
font-size: 30px; font-size: 30px;
margin-top: 6px; margin-top: 6px;
} }
.train-end-btn-box{ .train-end-btn-box {
width: 454px; width: 454px;
height: 91px; height: 91px;
justify-content: center; justify-content: center;
} }
.train-end-btn{ .train-end-btn {
width: 327px; width: 327px;
height: 91px; height: 91px;
} }
/**退出**/ /**退出**/
.train-out{ .train-out {
width: 454px; width: 454px;
height: 454px; height: 454px;
flex-direction:column; flex-direction: column;
align-items: center; align-items: center;
justify-content:center; justify-content: center;
} }
.train-out-icon{ .train-out-icon {
width: 120px; width: 120px;
height: 68px; height: 68px;
} }
.train-out-text-box{ .train-out-text-box {
width: 350px; width: 350px;
height: 84px; height: 84px;
margin-top: 32px; margin-top: 32px;
flex-direction: column; flex-direction: column;
} }
.train-out-text{ .train-out-text {
width: 350px; width: 350px;
text-align: center; text-align: center;
height: 42px; height: 42px;
......
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
<div class="train-quit" if="page == '12'"> <div class="train-quit" if="page == '12'">
<image class="train-quit-icon" src="../../common/oppo_img_fit.png"></image> <image class="train-quit-icon" src="../../common/oppo_img_fit.png"></image>
<div class="train-quit-text-box"> <div class="train-quit-text-box">
<text class="train-quit-text"> <text class="train-quit-text ">
请在手机上打开Fit,并登录账户 请在手机上打开Fit,并登录账户
</text> </text>
</div> </div>
...@@ -23,30 +23,32 @@ ...@@ -23,30 +23,32 @@
</text> </text>
<!--训练准备倒计时end--> <!--训练准备倒计时end-->
<!-- 标题 --> <!-- 标题 -->
<div class="title" if="page == '2'"> <div class="title" if="page == '2' && !dataPageShow">
<text class="text">{{acName}} <text class="text">{{acName}}
</text> </text>
</div> </div>
<!-- 对端应用未安装 -->
<div class="install" if="page == '999'">
<text class="installText">
{{installText}}
</text>
</div>
<!-- 标题end --> <!-- 标题end -->
<swiper index="{{tabIndex}}" class="todo-wraper" if="page == '3' || page == '4' || page == '5'|| page == '6'"> <swiper index="{{tabIndex}}" class="todo-wraper" if="dataPageShow" @change="swiperChange">
<div class="todo-item"> <div class="todo-item">
<!-- 动作预览 --> <!-- 动作预览 -->
<div class="train-view"> <div class="train-view">
<text if="page == '3'" class="train-page-title"> <text if="page == '2'||page == '3'" class="train-page-title">
动作预览 动作预览
</text> </text>
<div if="page == '4' " class="train-pape-num-box"> <div if="page == '4' " class="train-pape-num-box">
<text class="train-pape-num-o">{{countdownT}} <text class="train-pape-num-o">{{countdownT}}
</text> </text>
</div> </div>
<div if="(page == '5'|| page == '6') && acType == '1' " class="train-pape-num-box"> <div if="page == '5'|| page == '6'" class="train-pape-num-box">
<text class="train-pape-num">{{countdownT}} <text class="train-pape-num">{{countdownT}}
</text> </text>
</div> </div>
<div if="page == '5'&& acType == '0' " class="train-pape-num-box">
<text class="train-pape-num">{{acCnt}}/{{acTotalCnt}}
</text>
</div>
<text class="train-view-title"> {{acName}} <text class="train-view-title"> {{acName}}
</text> </text>
<div class="train-view-progress-line"> <div class="train-view-progress-line">
...@@ -55,16 +57,12 @@ ...@@ -55,16 +57,12 @@
<div class="train-num"> <div class="train-num">
<div class="train-heartbeat"> <div class="train-heartbeat">
<image class="train-num-icon" src="../../common/oppo_icon_heart.png"></image> <image class="train-num-icon" src="../../common/oppo_icon_heart.png"></image>
<text if="newHeartRate != '--'" class="train-num-text">{{newHeartRate}} <text class="train-num-text">{{newHeartRate}}
</text>
<text class="train-num-text train-num-text-no" else>{{newHeartRate}}
</text> </text>
</div> </div>
<div class="train-calorie"> <div class="train-calorie">
<image class="train-num-icon" src="../../common/oppo_icon_calorie.png"></image> <image class="train-num-icon" src="../../common/oppo_icon_calorie.png"></image>
<text if="acCalorie != '--'" class="train-num-text">{{acCalorie}} <text class="train-num-text">{{acCalorie}}
</text>
<text class="train-num-text train-num-text-no" else>{{acCalorie}}
</text> </text>
</div> </div>
</div> </div>
...@@ -98,7 +96,7 @@ ...@@ -98,7 +96,7 @@
</div> </div>
</swiper> </swiper>
<!--切换圆点--> <!--切换圆点-->
<div class="select" if="page == '3' || page == '4' || page == '5' || page == '7' || page == '8'"> <div class="select" if="dataPageShow">
<div if="{{tabIndex == 0}}" class="select-item select-item-active"></div> <div if="{{tabIndex == 0}}" class="select-item select-item-active"></div>
<div if="{{tabIndex == 0}}" class="select-item"></div> <div if="{{tabIndex == 0}}" class="select-item"></div>
<div if="{{tabIndex == 1}}" class="select-item"></div> <div if="{{tabIndex == 1}}" class="select-item"></div>
......
import sensor from '@system.sensor'; //传感器 import sensor from '@system.sensor'; //传感器
import vibrator from '@system.vibrator'; //震动 import vibrator from '@system.vibrator'; //震动
import brightness from '@system.brightness' //保持屏幕常亮 import brightness from '@system.brightness' //保持屏幕常亮
//import {P2pClient, Message, Builder} from '../wearengine'
export default { export default {
data: { data: {
page: "", //显示页面 page: "", //显示页面
title: "训练准备", //页面标题 title: "训练准备", //页面标题
acName: " ", //动作名称 acName: "", //动作名称
progress: "", //进度条 progress: "", //进度条
acType: "", //次/秒 (0:次,1:秒) acType: "", //次/秒 (0:次,1:秒)
acCnt: "00", //动作次数
acTotalCnt: "00", // 动作总次数
acCalorie: "", //卡路里 acCalorie: "", //卡路里
countdownT: "", // 倒计时 countdownT: "", // 倒计时
restHint: "", //休息文案 restHint: "", //休息文案
...@@ -23,19 +22,23 @@ export default { ...@@ -23,19 +22,23 @@ export default {
maxHeartRate: "", //最高心率 maxHeartRate: "", //最高心率
rollbackStop: "", //切出回来时候,是否需要暂停 "0":暂停 "0以外":切出训练 rollbackStop: "", //切出回来时候,是否需要暂停 "0":暂停 "0以外":切出训练
newHeartRate: "--", //当前心率 newHeartRate: "--", //当前心率
isStop: false, //是否暂停 isStop: false, //是否是手表端暂停
sendFlg: false, // 是否在发送消息 sendFlg: false, // 是否在发送消息
stopFlg: false, //是否暂停 stopFlg: false, //是否暂停
tabIndex: 0, //滑动index tabIndex: 0, //滑动index
isPhoneLeave: false, //手机端离开状态 isPhoneLeave: false, //手机端离开状态
isEnd: false, //是否完成 isEnd: false, //是否完成
lastPage: "", //上个页面标识 isJumpLoginPage: true, //是否跳转到未登录提示页
isReceiveStartMessage: false, //启动时收到手机端给的回复消息 dataPageShow: false, //训练数据页面是否显示
canReceiveMessage: true, //是否可以接收手机端其他事件(手表端主动暂停或训练结束后,不再接收除17外的其他事件)
installText: "请在手机上下载\nFit App",
}, },
onReady() { onReady() {
let _this = this; let _this = this;
//数据重置 //数据重置
_this.restore(); _this.restore();
//ping手机端状态
// _this.ping();
//获取客户端信息 //获取客户端信息
_this.getMsg(); _this.getMsg();
//发送个启动事件 //发送个启动事件
...@@ -44,7 +47,7 @@ export default { ...@@ -44,7 +47,7 @@ export default {
}); });
//关闭启动页 //关闭启动页
setTimeout(function () { setTimeout(function () {
if (!_this.isReceiveStartMessage) { if (_this.isJumpLoginPage) {
_this.page = "12"; _this.page = "12";
} }
},1500); },1500);
...@@ -66,12 +69,19 @@ export default { ...@@ -66,12 +69,19 @@ export default {
let _this = this; let _this = this;
let model = msg.acModel; let model = msg.acModel;
//手表端主动关闭训练后,不接收除17外的初始化事件,
if (msg.eventFlg == "17") {
_this.canReceiveMessage = true;
}
if (!_this.canReceiveMessage) {
return;
}
//接到手机端消息时(去掉17初始化的事件),启动页显示完后,不显示提示登录页面page 12 //接到手机端消息时(去掉17初始化的事件),启动页显示完后,不显示提示登录页面page 12
if (msg.eventFlg != "") { if (msg.eventFlg != "") {
if (msg.eventFlg == "17") { if (msg.eventFlg == "17") {
_this.page = "11"; _this.page = "11";
} }
_this.isReceiveStartMessage = true; _this.isJumpLoginPage = false;
} }
if (_this.sendFlg) { if (_this.sendFlg) {
return false; return false;
...@@ -82,7 +92,7 @@ export default { ...@@ -82,7 +92,7 @@ export default {
_this.isStop = false; _this.isStop = false;
//手机端主动离开事件,等待0.5秒后再处理其他事件 //手机端主动离开事件,等待0.5秒后再处理其他事件
if (_this.isPhoneLeave) { if (_this.isPhoneLeave && msg.eventFlg != "10") {
return return
} }
if (msg.eventFlg == "15" && model.rollbackStop != '0') { if (msg.eventFlg == "15" && model.rollbackStop != '0') {
...@@ -97,6 +107,17 @@ export default { ...@@ -97,6 +107,17 @@ export default {
return false; return false;
} }
} }
//训练数据页面是否显示(避免重复添加、移除操作)
if (msg.eventFlg != "13" && msg.eventFlg != "14") {
if (msg.eventFlg == "3" || msg.eventFlg == "4" || msg.eventFlg == "5" || msg.eventFlg == "6" || msg.eventFlg == "7" || msg.eventFlg == "8") {
if (!_this.dataPageShow) {
_this.dataPageShow = true;
}
} else {
_this.dataPageShow = false;
}
}
// _this.sendErrMsg(msg.eventFlg,"手表端处理接收到的消息类型:");
switch (msg.eventFlg) { switch (msg.eventFlg) {
case "0": //训练准备 case "0": //训练准备
_this.page = "0"; _this.page = "0";
...@@ -114,6 +135,8 @@ export default { ...@@ -114,6 +135,8 @@ export default {
_this.acName = model.acName; _this.acName = model.acName;
_this.isLast = model.isLast; _this.isLast = model.isLast;
_this.isFirst = model.isFirst; _this.isFirst = model.isFirst;
_this.tabIndex = 0;
_this.stopFlg = false;
break; break;
case "3": //动作预览 case "3": //动作预览
_this.page = "3"; _this.page = "3";
...@@ -127,11 +150,11 @@ export default { ...@@ -127,11 +150,11 @@ export default {
case "5": //训练动作倒计时 case "5": //训练动作倒计时
_this.page = "5"; _this.page = "5";
_this.acName = model.acName; _this.acName = model.acName;
_this.countdownT = model.countdownT == "-1" ? "0" : model.countdownT;
_this.acType = model.acType; _this.acType = model.acType;
if (model.acType == "0") { if (model.acType == "0") {
_this.acCnt = model.acCnt; _this.countdownT = model.acCnt + "/" + model.acTotalCnt;
_this.acTotalCnt = model.acTotalCnt; } else {
_this.countdownT = model.countdownT;
} }
break; break;
case "6": //休息中 case "6": //休息中
...@@ -141,6 +164,7 @@ export default { ...@@ -141,6 +164,7 @@ export default {
_this.acType = 1; _this.acType = 1;
break; break;
case "7": //暂停 case "7": //暂停
_this.page = "7";
_this.tabIndex = 1; _this.tabIndex = 1;
_this.stopFlg = true; _this.stopFlg = true;
break; break;
...@@ -151,24 +175,25 @@ export default { ...@@ -151,24 +175,25 @@ export default {
break; break;
case "9": //完成训练 case "9": //完成训练
_this.vibrate(); _this.vibrate();
_this.canReceiveMessage = false;
_this.isEnd = true; _this.isEnd = true;
_this.page = "9"; _this.page = "9";
_this.fitTotalDuration = model.fitTotalDuration; _this.fitTotalDuration = model.fitTotalDuration;
_this.averHeartRate = _this.getAverHeartRate(_this.heartRateList); //平均心率 _this.averHeartRate = _this.getAverHeartRate(_this.heartRateList); //平均心率
_this.maxHeartRate = _this.getMaxHeartRatet(_this.heartRateList); //最高心率 _this.maxHeartRate = _this.getMaxHeartRatet(_this.heartRateList); //最高心率
_this.acCalorie = model.acCalorie; _this.acCalorie = model.acCalorie;
this.quit(); _this.quit();
break; break;
case "10": //退出训练 case "10": //退出训练
_this.page = "10"; _this.page = "10";
this.quit(); _this.quit();
break; break;
case "11": //登录中 case "11": //登录中
_this.page = "11" _this.page = "11"
break; break;
case "12": //退出登录 case "12": //退出登录
_this.page = "12"; _this.page = "12";
this.quit(); _this.quit();
break; break;
case "13": //进度条 case "13": //进度条
_this.progress = ((model.acProgress / model.maxProgress) * 350); _this.progress = ((model.acProgress / model.maxProgress) * 350);
...@@ -178,19 +203,12 @@ export default { ...@@ -178,19 +203,12 @@ export default {
_this.fitDuration = model.fitDuration; _this.fitDuration = model.fitDuration;
break; break;
case "15": //离开或者返回训练 case "15": //离开或者返回训练
if (model.rollbackStop == '0') { _this.page = "15";
if (_this.lastPage != "") { _this.quit();
_this.page = _this.lastPage;
}
} else {
_this.lastPage = _this.page;
_this.page = "15"
}
this.quit();
break; break;
case "16": //杀掉进程 case "16": //杀掉进程
_this.page = "12"; _this.page = "12";
this.quit(); _this.quit();
break; break;
case "17": //播放初始化、注册心率 case "17": //播放初始化、注册心率
//获取心率 //获取心率
...@@ -199,6 +217,39 @@ export default { ...@@ -199,6 +217,39 @@ export default {
} }
}, },
/**
*PING手机端状态
*/
// ping() {
// let _this = this;
// // 步骤1:创建点对点通信对象
// var p2pClient = new P2pClient();
// // 步骤2:设置需要通信的手机侧对应的三方应用包名
// p2pClient.setPeerPkgName("com.sportq.fit");
// // 步骤3:检测手机侧对应的第三方应用是否在线
// p2pClient.ping({
// onSuccess: function () {
// console.log('ping success.');
// },
// onFailure: function () {
// console.log('ping failed');
// },
// onPingResult: function (resultCode) {
// //205:手机端应用已安装 204:未安装
// if (resultCode.code == 205) {
// //发送个启动事件
// _this.sendMsg({
// "eventFlg": "6",
// });
// } else {
// //对端应用未安装,提示安装
// _this.isJumpLoginPage = false;
// _this.page = "999";
// }
// console.log(resultCode.data + resultCode.code);
// },
// });
// },
/** /**
发送短消息给客户端 发送短消息给客户端
*/ */
...@@ -245,6 +296,7 @@ export default { ...@@ -245,6 +296,7 @@ export default {
let _this = this; let _this = this;
FeatureAbility.subscribeMsg({ FeatureAbility.subscribeMsg({
success: function (data) { success: function (data) {
// _this.sendErrMsg(data.message,"手表端接收到消息数据:");
_this.start(JSON.parse(data.message)); _this.start(JSON.parse(data.message));
}, },
fail: function (data, code) { fail: function (data, code) {
...@@ -361,6 +413,8 @@ export default { ...@@ -361,6 +413,8 @@ export default {
*关闭 *关闭
*/ */
close() { close() {
this.canReceiveMessage = false;
this.page = "10";
this.sendMsg({ this.sendMsg({
"eventFlg": "5", "eventFlg": "5",
}); });
...@@ -410,8 +464,8 @@ export default { ...@@ -410,8 +464,8 @@ export default {
*数据重置 *数据重置
*/ */
restore() { restore() {
this.lastPage = "";
this.isStop = false; this.isStop = false;
this.canReceiveMessage = true;
this.sendFlg = false; this.sendFlg = false;
this.stopFlg = false; this.stopFlg = false;
this.heartRateList = []; this.heartRateList = [];
...@@ -438,5 +492,13 @@ export default { ...@@ -438,5 +492,13 @@ export default {
*/ */
end() { end() {
this.page = '10'; this.page = '10';
},
/*
*swiper滑动
*/
swiperChange(index) {
console.info(index);
this.tabIndex = index.index;
} }
} }
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