Commit 9f2e686d authored by Sky's avatar Sky

签名证书和海外版统一

parent b9ad6fe2
......@@ -4,6 +4,12 @@ apply plugin: 'com.huawei.ohos.app'
ohos {
signingConfigs {
release {
storeFile file('D:/HuaweiWatchClient/huawei_watch_overseas.p12')
storePassword '0000001BA8DBFB85AF4C3C13D4E1154681D55F3BFAFF102F4A821F3435CA996DD0995FE410CA7C66E1C42F'
keyAlias 'huawei_watch_overseas Release'
keyPassword '0000001BE693BFFA074478CD0303FCA6F29E5C0DBFC29C097D218979DD9C1AF740EFAFC7EFFA3E9D74173A'
profile file('D:/HuaweiWatchClient/com.company.fit.provisionRelease.p7b')
certpath file('D:/HuaweiWatchClient/com.company.fit.overseas_release.cer')
signAlg 'SHA256withECDSA'
}
}
......
......@@ -32,20 +32,20 @@ ZPqdAjBLkf8NPZy7KVog98+iCTLq35DJ2ZVxkCxknA9YhiHVyXf4HPm4JlT7rW7o
Q+FzM3c=
-----END CERTIFICATE-----
-----BEGIN CERTIFICATE-----
MIIC5jCCAmygAwIBAgIOCfW2YZ9oK72I9bBIhLgwCgYIKoZIzj0EAwMwYjELMAkG
MIIC5TCCAmygAwIBAgIOY5lDtH5btRxQiQef3eowCgYIKoZIzj0EAwMwYjELMAkG
A1UEBgwCQ04xDzANBgNVBAoMBkh1YXdlaTETMBEGA1UECwwKSHVhd2VpIENCRzEt
MCsGA1UEAwwkSHVhd2VpIENCRyBEZXZlbG9wZXIgUmVsYXRpb25zIENBIEcyMB4X
DTIwMDkwMzA1MzkyMloXDTIxMDkwMzA1MzkyMVowgawxCzAJBgNVBAYTAkNOMS0w
DTIwMTAxNDEzMzI1MloXDTIxMTAxNDEzMzI1MVowgawxCzAJBgNVBAYTAkNOMS0w
KwYDVQQKDCTkuIrmtbfljrvliqjnvZHnu5znp5HmioDmnInpmZDlhazlj7gxHTAb
BgNVBAsMFDE0MDA1Nzg3NzE0NTc4ODA5MzMyMU8wTQYDVQQDDEbkuIrmtbfljrvl
iqjnvZHnu5znp5HmioDm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A1Mjc1OVowgagxCzAJBgNVBAYTAkNOMS0w
KwYDVQQKDCTkuIrmtbfljrvliqjnvZHnu5znp5HmioDmnInpmZDlhazlj7gxHTAb
BgNVBAsMFDE0MDA1Nzg3NzE0NTc4ODA5MzMyMUswSQYDVQQDDELkuIrmtbfljrvl
iqjnvZHnu5znp5HmioDmnInpmZDlhazlj7goMTQwMDU3ODc3MTQ1Nzg4MDkzMzIp
LFJlbGVhc2UwWTATBgcqhkjOPQIBBggqhkjOPQMBBwNCAASiW3X0SW5irgRLArVm
gEWyzblTN+hLQ6L/kWoz8tKpkcuHAF3OPoO7PFbOD/9apHx9TJUo4e95ayrvh6o9
mytEo4G6MIG3MAwGA1UdEwEB/wQCMAAwQgYDVR0fBDswOTA3oDWgM4YxaHR0cDov
L2NybC5jbG91ZC5odWF3ZWkuY29tL0h1YXdlaUNCR0hEUkcyY3JsLmNybDAfBgNV
HSMEGDAWgBTbXpOyI+jQ5P5xembppHNHW3/zXjAdBgNVHQ4EFgQU9Mn7hTtLDRzn
zDVDeryn7U0ESx8wDgYDVR0PAQH/BAQDAgeAMBMGA1UdJQQMMAoGCCsGAQUFBwMD
MAoGCCqGSM49BAMDA2gAMGUCMH5TGftYxwzWVxXJRYaWQ/lMVDCZMfUundCNjkwz
axvkY493pfh/6t8kdx5UQDqpnAIxAOv7hZQ6iAAgqGW3TcGLUm7ptDz4RJm9aC73
ZeeXm2myS/mE+gU8LWBpEPWG/w0CQg==
-----END CERTIFICATE-----
......@@ -3,13 +3,22 @@ apply plugin: 'com.huawei.ohos.hap'
ohos {
signingConfigs {
debug {
certpath file('D:/HuaweiWatchClient/fitjs_certificate.cer')
profile file('D:/HuaweiWatchClient/fitjs_provisionDebug.p7b')
certpath file('D:/HuaweiWatchClient/com.company.fit.overseas_debug.cer')
profile file('D:/HuaweiWatchClient/com.company.fit.proDebug.p7b')
signAlg 'SHA256withECDSA'
keyPassword '0000001BC4E4A99A1313A6D5ACBC0859CA370605139A0EEB174EB20A948AAB1365AE5A87A93F916BD52C16'
keyAlias 'huawei_watch Release'
storePassword '0000001B6FBBA74F0356FAFA4A45C1573FF4F04809DED359D259DBDF563E31A75F2F8D4F5ABB2EDC2AC672'
storeFile file('D:/HuaweiWatchClient/huawei_watch.jks')
keyPassword '0000001B91CB7A87C60FC999DDD2BCDBA8D578B5C8DBB818CE2CDC02F5190E08191F69238AAEDB019E9CB5'
keyAlias 'huawei_watch_overseas Release'
storePassword '0000001B274F149CB95174CB5174B918C3945F5514CB95A7CB8A0A65B239297CAE2F3697FD27046A3E4B74'
storeFile file('D:/HuaweiWatchClient/huawei_watch_overseas.p12')
}
release {
storeFile file('D:/HuaweiWatchClient/huawei_watch_overseas.p12')
storePassword '0000001BF3E0F7119A4D4AA09CA834CEE57597D549140F82F1D8A44B2C4048F81E7E353510DBC7AB282BB4'
keyAlias 'huawei_watch_overseas Release'
keyPassword '0000001B2E7E1F6C1396C80A08713B5388FEB76CBD2F743AE67E39F510073793C9104EB4E0159E4FA12807'
signAlg 'SHA256withECDSA'
profile file('D:/HuaweiWatchClient/com.company.fit.provisionRelease.p7b')
certpath file('D:/HuaweiWatchClient/com.company.fit.overseas_release.cer')
}
}
compileSdkVersion 3
......
......@@ -41,7 +41,8 @@
"js": [
{
"pages": [
"pages/index/index"
"pages/index/index",
"pages/end/end"
],
"name": "default"
}
......
.container {
justify-content: center;
align-items: center;
left: 0px;
top: 0px;
width: 454px;
height: 454px;
color: #FFFFFF;
flex-direction: column;
}
/*完成训练*/
.train-end {
width: 454px;
height: 454px;
flex-direction: column;
}
.train-end-tt {
height: 103px;
width: 454px;
justify-content: center;
align-items: center;
flex-direction: column;
margin-top: 40px;
}
.train-end-tt-text {
font-size: 38px;
margin-bottom: 10px;
}
.train-end-time {
font-size: 30px;
color: #A8A8A8;
}
.train-end-list {
align-items: flex-end;
width: 454px;
height: 200px;
flex-direction: column;
margin-top: 20px;
}
.train-end-list-item {
width: 450px;
height: 40px;
justify-content: center;
margin-bottom: 30px;
}
.train-end-label {
height: 38px;
width: 147px;
color: #A8A8A8;
font-size: 30px;
margin-top: 6px;
}
.train-end-num {
width: 104px;
margin-right: 16px;
font-size: 38px;
text-align: right;
}
.train-end-unit {
width: 83px;
color: #A8A8A8;
font-size: 30px;
margin-top: 6px;
}
.train-end-btn-box {
width: 454px;
height: 91px;
justify-content: center;
}
.train-end-btn {
width: 327px;
height: 91px;
}
\ No newline at end of file
<div class="container" onswipe="touchMove">
<!--完成训练-->
<div class="train-end">
<div class="train-end-tt">
<text class="train-end-tt-text">
运动数据
</text>
<text class="train-end-time">
{{fitTotalDuration}}分钟
</text>
</div>
<div class="train-end-list">
<div class="train-end-list-item">
<text class="train-end-label">
平均心率
</text>
<text class="train-end-num">
{{averHeartRate}}
</text>
<text class="train-end-unit">
Bpm
</text>
</div>
<div class="train-end-list-item">
<text class="train-end-label">
最高心率
</text>
<text class="train-end-num">
{{maxHeartRate}}
</text>
<text class="train-end-unit">
Bpm
</text>
</div>
<div class="train-end-list-item">
<text class="train-end-label">
我的消耗
</text>
<text class="train-end-num">
{{acCalorie}}
</text>
<text class="train-end-unit">
千卡
</text>
</div>
</div>
<div class="train-end-btn-box" @click="end">
<image class="train-end-btn" src="../../common/hm_btn_finish.png"></image>
</div>
</div>
<!--完成训练end-->
</div>
\ No newline at end of file
import brightness from '@system.brightness' //保持屏幕常亮
import app from '@system.app' //右滑退出
import router from '@system.router' //页面跳转
var timer;
export default {
data: {
acCalorie: "0", //卡路里
fitTotalDuration: "", //训练时长-用于训练完成界面
averHeartRate: "", //平均心率
maxHeartRate: "", //最高心率
},
onReady() {
let _this = this;
//获取客户端信息
_this.getMsg();
//更新页面数据
_this.acCalorie = _this.endCalorie;
_this.fitTotalDuration = _this.endTotalTime;
_this.averHeartRate = _this.endAverHeartRate;
_this.maxHeartRate = _this.endMaxHeartRate;
},
onShow() {
let _this = this;
//保持屏幕常亮
_this.keepScreenOn();
timer = setInterval(function () {
_this.keepScreenOn();
},2 * 60 * 1000);
},
onDestroy() {
if (timer != null) {
clearInterval(timer);
}
//取消接收手机侧第三方应用发过来的消息
FeatureAbility.unsubscribeMsg();
},
start(msg) {
let _this = this;
let model = msg.acModel;
//训练完成页面,只接收重新开始训练事件
if (msg.eventFlg == "17") {
router.replace({
uri: "pages/index/index",
params: {
initPage: "0"
}
});
}
},
/**
*保持屏幕常亮
*/
keepScreenOn() {
brightness.setKeepScreenOn({
keepScreenOn: true,
success: function () {
},
fail: function (data, code) {
}
})
},
/**
*获取客户端短消息
*/
getMsg() {
let _this = this;
FeatureAbility.subscribeMsg({
success: function (data) {
_this.start(JSON.parse(data.message));
},
fail: function (data, code) {
}
});
},
/**
*完成
*/
end() {
router.replace({
uri: "pages/index/index",
params: {
initPage: "11"
}
});
},
/**
*右滑退出
*/
touchMove: function (e) {
if (e.direction == "right") {
app.terminate();
}
}
}
......@@ -10,8 +10,8 @@
}
/*准备开始*/
.logo {
width: 230px;
height: 129px;
width: 224px;
height: 127px;
}
.start {
width: 454px;
......@@ -23,51 +23,23 @@
font-size: 38px;
text-align: center;
}
/* 标题 */
.title {
/* 动作预览 */
.train-view {
width: 454px;
height: 454px;
flex-direction: column;
align-items: center;
justify-content: center;
}
.text {
color: #ffffff;
font-size: 38px;
width: 262px;
}
/* 标题 */
.install {
width: 280px;
height: 120px;
align-items: center;
justify-content: center;
}
/*对端应用未安装*/
.installText {
color: #ffffff;
.train-page-title {
font-size: 38px;
width: 280px;
height: 130px;
margin-top: 60px;
width: 350px;
color: #FFFFFF;
text-align: center;
justify-content: center;
}
/*倒计时*/
.count-down {
font-size: 38px;
color: #FFD208;
}
.count-down-num {
width: 60px;
height: 170px;
}
/* 动作预览 */
.train-view {
width: 454px;
height: 454px;
flex-direction: column;
align-items: center;
}
.train-page-title,.train-pape-num-box {
.train-pape-num-box {
font-size: 38px;
height: 130px;
margin-top: 60px;
......@@ -79,10 +51,6 @@
.train-pape-num {
font-size: 38px;
}
.train-pape-num-f {
font-size: 30px;
margin-top: 8px;
}
.train-pape-num-o {
color: #FFD208;
font-size: 38px;
......@@ -111,7 +79,13 @@
height: 54px;
margin-top: 26px;
}
.train-heartbeat,.train-calorie {
.train-heartbeat {
width: 175px;
height: 54px;
justify-content: center;
align-items: center;
}
.train-calorie {
width: 175px;
height: 54px;
justify-content: center;
......@@ -129,9 +103,6 @@
align-items: center;
font-size: 38px;
}
.train-num-text-no {
color: #C8C8C8;
}
.select {
width: 454px;
......@@ -165,14 +136,6 @@
margin-top: 26px;
font-size: 38px;
}
.train-time-icon {
width: 46px;
height: 130px;
}
.train-time-icon-d {
width: 26px;
height: 130px;
}
.train-tool {
width: 454px;
height: 120px;
......@@ -202,17 +165,16 @@
width: 90px;
height: 160px;
}
.train-quit-logo-icon {
width: 120px;
height: 68px;
}
.train-quit-text-box {
width: 350px;
height: 84px;
.train-quit-text {
margin-top: 32px;
width: 300px;
text-align: center;
}
.train-quit-text {
width: 350px;
margin-top: 32px;
width: 370px;
font-size: 30px;
text-align: center;
}
......@@ -237,94 +199,93 @@
height: 418px;
flex-direction: row;
}
.todo-item {
/**退出**/
.train-out {
width: 454px;
height: 418px;
height: 454px;
flex-direction: column;
align-items: center;
justify-content: center;
}
.train-out-icon {
width: 120px;
height: 68px;
}
.train-out-text {
margin-top: 32px;
width: 230px;
text-align: center;
}
/*完成训练*/
.train-end {
.stack-intro {
width: 454px;
height: 454px;
flex-direction: column;
}
.train-end-tt {
height: 103px;
.content-intro-div {
width: 454px;
justify-content: center;
align-items: center;
flex-direction: column;
margin-top: 40px;
}
.train-end-tt-text {
font-size: 38px;
margin-bottom: 10px;
}
.train-end-time {
font-size: 30px;
color: #A8A8A8;
height: 454px;
}
.train-end-list {
align-items: flex-end;
.content-intro-start-div {
width: 454px;
height: 200px;
flex-direction: column;
margin-top: 20px;
background-color: transparent;
height: 454px;
}
.train-end-list-item {
width: 450px;
height: 38px;
justify-content: center;
margin-bottom: 30px;
.swiper-intro {
flex-direction: row;
width: 454px;
height: 454px;
}
.train-end-label {
height: 38px;
width: 147px;
color: #A8A8A8;
font-size: 30px;
margin-top: 6px;
.swper-intro-img {
width: 454px;
height: 454px;
}
.train-end-num {
width: 104px;
margin-right: 16px;
font-size: 38px;
text-align: right;
.swper-intro-img01 {
width: 454px;
margin-top: 38px;
height: 266px;
}
.train-end-unit {
width: 83px;
color: #A8A8A8;
font-size: 30px;
margin-top: 6px;
.swper-intro-img02 {
margin-top: 38px;
width: 454px;
height: 266px;
}
.train-end-btn-box {
.swper-intro-img03-div {
width: 454px;
height: 91px;
justify-content: center;
}
.train-end-btn {
.swper-intro-img03 {
width: 327px;
height: 91px;
}
/**退出**/
.train-out {
.intro-select {
width: 454px;
height: 454px;
flex-direction: column;
align-items: center;
height: 36px;
margin-top: 335px;
justify-content: center;
}
.train-out-icon {
width: 120px;
height: 68px;
.intro-select-item {
width: 12px;
height: 12px;
border-radius: 12px;
margin-left: 6px;
margin-right: 6px;
background-color: rgba(255, 255, 255, 0.44);
}
.train-out-text-box {
width: 350px;
height: 84px;
margin-top: 32px;
flex-direction: column;
.intro-select-item-active {
background-color: #FFFFFF;
}
.train-out-text {
width: 350px;
.download-text {
width: 230px;
font-size: 30px;
text-align: center;
height: 42px;
}
\ No newline at end of file
}
......@@ -2,97 +2,68 @@
<!--启动页面-->
<image class="logo" if="!page" src="../../common/default_img.png"></image>
<!--启动页面-->
<!--训练切出-->
<div class="train-quit" if="page == '12'">
<image class="train-quit-icon" src="../../common/oppo_img_fit.png"></image>
<div class="train-quit-text-box">
<text class="train-quit-text ">
请在手机上打开Fit,并登录账户
</text>
</div>
</div>
<!--训练切出end-->
<!--准备开始-->
<div class="start" if="page == '0'">
<text class="start-text">准备开始
<text class="start-text">
准备开始
</text>
</div>
<!--准备开始end-->
<!--训练准备倒计时-->
<div class="start" if="page == '1'">
<text class="start-text count-down">{{countdownT}}
</text>
</div>
<!--训练准备倒计时end-->
<!-- 标题 -->
<div class="start" if="page == '2' && !dataPageShow">
<text class="start-text text">{{acName}}
</text>
</div>
<!-- 对端应用未安装 -->
<div class="install" if="page == '999'">
<text class="installText">
{{installText}}
</text>
</div>
<!-- 标题end -->
<swiper index="{{tabIndex}}" class="todo-wraper" if="dataPageShow" @change="swiperChange">
<div class="todo-item">
<!-- 动作预览 -->
<div class="train-view">
<text if="page == '2'||page == '3'" class="train-page-title">
动作预览
<swiper index="{{tabIndex}}" class="todo-wraper" if="dataPageShow" @change="swiperChange">
<!-- 动作预览 -->
<div class="train-view">
<text if="page == '2'||page == '3'" class="train-page-title">
<!--动作预览 -->
动作预览
</text>
<div if="page == '1'||page == '4' " class="train-pape-num-box">
<text class="train-pape-num-o">{{countdownT}}
</text>
</div>
<div if="page == '5'|| page == '6'" class="train-pape-num-box">
<text class="train-pape-num">{{countdownT}}
</text>
<div if="page == '4' " class="train-pape-num-box">
<text class="train-pape-num-o">{{countdownT}}
</div>
<text class="train-view-title"> {{acName}}
</text>
<div class="train-view-progress-line">
<div class="train-view-progress-new" style="width: {{progress}}"></div>
</div>
<div class="train-num">
<div class="train-heartbeat">
<image class="train-num-icon" src="../../common/oppo_icon_heart.png"></image>
<text class="train-num-text">{{newHeartRate}}
</text>
</div>
<div if="page == '5'|| page == '6'" class="train-pape-num-box">
<text class="train-pape-num">{{countdownT}}
<div class="train-calorie">
<image class="train-num-icon" src="../../common/oppo_icon_calorie.png"></image>
<text class="train-num-text">{{acCalorie}}
</text>
</div>
<text class="train-view-title"> {{acName}}
</text>
<div class="train-view-progress-line">
<div class="train-view-progress-new" style="width: {{progress}}"></div>
</div>
<div class="train-num">
<div class="train-heartbeat">
<image class="train-num-icon" src="../../common/oppo_icon_heart.png"></image>
<text class="train-num-text">{{newHeartRate}}
</text>
</div>
<div class="train-calorie">
<image class="train-num-icon" src="../../common/oppo_icon_calorie.png"></image>
<text class="train-num-text">{{acCalorie}}
</text>
</div>
</div>
</div>
<!-- 动作预览end -->
</div>
<div class="todo-item">
<!-- 已训练 -->
<div class="train-view">
<text class="train-new-title">
已训练
</text>
<text class="train-time">{{fitDuration}}
</text>
<div class="train-tool" if="{{stopFlg}}">
<image class="train-play-icon" @click="play" src="../../common/oppo_btn_play.png"></image>
<image class="train-play-icon" @click="close" src="../../common/oppo_btn_close.png"></image>
</div>
<div class="train-tool" else>
<image class="train-tool-icon" if="{{isFirst == '0'}}"
src="../../common/oppo_btn_previous_disabled.png"></image>
<image class="train-tool-icon" @click="previous"src="../../common/oppo_btn_previous.png"
else></image>
<image class="train-play-icon" @click="stop" src="../../common/oppo_bun_pause.png"></image>
<image class="train-tool-icon" if="{{isLast == '0'}}"
src="../../common/oppo_btn_next_disabled.png"></image>
<image class="train-tool-icon" @click="next" src="../../common/oppo_btn_next.png" else></image>
</div>
<!-- 已训练 -->
<div class="train-view">
<text class="train-new-title">
<!--已训练 -->
已训练
</text>
<text class="train-time">{{fitDuration}}
</text>
<div class="train-tool" if="{{stopFlg}}">
<image class="train-play-icon" @click="play" src="../../common/oppo_btn_play.png"></image>
<image class="train-play-icon" @click="close" src="../../common/oppo_btn_close.png"></image>
</div>
<div class="train-tool" else>
<image class="train-tool-icon" if="{{isFirst == '0'}}"
src="../../common/oppo_btn_previous_disabled.png"></image>
<image class="train-tool-icon" @click="previous" src="../../common/oppo_btn_previous.png" else></image>
<image class="train-play-icon" @click="stop" src="../../common/oppo_bun_pause.png"></image>
<image class="train-tool-icon" if="{{isLast == '0'}}"
src="../../common/oppo_btn_next_disabled.png"></image>
<image class="train-tool-icon" @click="next" src="../../common/oppo_btn_next.png" else></image>
</div>
<!-- 已训练end -->
</div>
......@@ -108,11 +79,9 @@
<!--训练切出-->
<div class="train-quit" if="page == '15'">
<image class="train-quit-icon" src="../../common/oppo_img_fit.png"></image>
<div class="train-quit-text-box">
<text class="train-quit-text">
请在手机上返回训练视频,继续您的训练
</text>
</div>
<text class="train-quit-text">
请在手机上返回训练视频,继续您的训练
</text>
</div>
<!--训练切出end-->
<!--暂停播放倒计时-->
......@@ -122,61 +91,44 @@
</text>
</div>
<!---暂停播放倒计时end-->
<!--完成训练-->
<div class="train-end" if="page == '9'">
<div class="train-end-tt">
<text class="train-end-tt-text">
运动数据
</text>
<text class="train-end-time">{{fitTotalDuration}}分钟
</text>
</div>
<div class="train-end-list">
<div class="train-end-list-item">
<text class="train-end-label">
平均心率
</text>
<text class="train-end-num">{{averHeartRate}}
</text>
<text class="train-end-unit">
Bpm
</text>
</div>
<div class="train-end-list-item">
<text class="train-end-label">
最高心率
</text>
<text class="train-end-num">{{maxHeartRate}}
</text>
<text class="train-end-unit">
Bpm
</text>
</div>
<div class="train-end-list-item">
<text class="train-end-label">
我的消耗
</text>
<text class="train-end-num">{{acCalorie}}
</text>
<text class="train-end-unit">
千卡
</text>
</div>
</div>
<div class="train-end-btn-box" @click="end">
<image class="train-end-btn" src="../../common/hm_btn_finish.png"></image>
</div>
</div>
<!--完成训练end-->
<!--退出训练-->
<div class="train-out" if="page == '10' || page == '11'">
<image class="train-out-icon" src="../../common/hm_img_logo.png"></image>
<div class="train-out-text-box">
<text class="train-out-text">
在手机上开启你
今天的训练
</text>
<text class="train-out-text">
在手机上开启你今天的训练
</text>
</div>
<!--退出训练-->
<!--介绍页start-->
<stack class="stack-intro" if="page == '99'">
<swiper class="swiper-intro" @change="swiperChange">
<div class="content-intro-div">
<image class="swper-intro-img01" src="../../common/hm_guide_01.png"></image>
</div>
<!-- 已训练 -->
<div class="content-intro-div">
<image class="swper-intro-img02" src="../../common/hm_guide_02.png"></image>
</div>
</swiper>
<div class="content-intro-start-div ">
<div class="intro-select">
<div if="{{tabIndex == 0}}" class="intro-select-item intro-select-item-active"></div>
<div if="{{tabIndex == 0}}" class="intro-select-item"></div>
<div if="{{tabIndex == 1}}" class="intro-select-item"></div>
<div if="{{tabIndex == 1}}" class="intro-select-item intro-select-item-active"></div>
</div>
<div class="swper-intro-img03-div">
<image class="swper-intro-img03" @click="introStart" src="../../common/hm_btn_start.png"></image>
</div>
</div>
</stack>
<!--介绍页end--
<!--未下载提示页start-->
<div class="start" if="page == '98'">
<text class="download-text">
请在手机上下载Fit App
</text>
</div>
<!--退出训练end-->
<!--未下载提示页end-->
</div>
\ No newline at end of file
......@@ -2,6 +2,7 @@ import sensor from '@system.sensor'; //传感器
import vibrator from '@system.vibrator'; //震动
import brightness from '@system.brightness' //保持屏幕常亮
import app from '@system.app' //右滑退出
import router from '@system.router' //页面跳转
var timer;
......@@ -10,26 +11,20 @@ export default {
page: "", //显示页面
acName: "", //动作名称
progress: "", //进度条
acType: "", //次/秒 (0:次,1:秒)
acCalorie: "", //卡路里
acCalorie: "0", //卡路里
countdownT: "", // 倒计时
restHint: "", //休息文案
isLast: "", //是否第一个动作 "0":真 "1":假
isFirst: "", // 是否最后一个动作 "0":真 "1":假
fitDuration: "00:00", //训练持续时长
fitTotalDuration: "", //训练时长-用于训练完成界面
heartRateList: [], //心率数组
averHeartRate: "", //平均心率
maxHeartRate: "", //最高心率
rollbackStop: "", //切出回来时候,是否需要暂停 "0":暂停 "0以外":切出训练
newHeartRate: "--", //当前心率
isStop: false, //是否是手表端暂停
sendFlg: false, // 是否在发送消息
stopFlg: false, //是否暂停
tabIndex: 0, //滑动index
tabIndex: 0, //训练数据滑动index
isPhoneLeave: false, //手机端离开状态
isEnd: false, //是否完成
lastPage: "", //手机端离开训练页面时的页面paeg
lastPage: "", //手机端离开训练页面时的页面page
isJumpLoginPage: true, //是否跳转到未登录提示页
dataPageShow: false, //训练数据页面是否显示
canReceiveMessage: true, //是否可以接收手机端其他事件(手表端主动暂停或训练结束后,不再接收除17外的其他事件)
......@@ -39,18 +34,24 @@ export default {
let _this = this;
//数据重置
_this.restore();
//ping手机端状态
// _this.ping();
//手机端是否安装了Fit
_this.checkInstall();
//获取客户端信息
_this.getMsg();
//发送个启动事件
_this.sendMsg({
"eventFlg": "6",
});
//在数据页面时,重新开启新的课程,跳转到训练页面的场合
if (_this.initPage == "0" || _this.initPage == "11") {
_this.isJumpLoginPage = false;
_this.isFirstInit = false;
_this.page = _this.initPage;
}
//关闭启动页
setTimeout(function () {
if (_this.isJumpLoginPage) {
_this.page = "12";
_this.page = "11";
}
},1500);
},
......@@ -60,7 +61,15 @@ export default {
_this.keepScreenOn();
timer = setInterval(function () {
_this.keepScreenOn();
},3 * 60 * 1000);
},2 * 60 * 1000);
},
onHide() {
this.stopFlg = true;
this.tabIndex = 1;
this.sendMsg({
"eventFlg": "3",
})
console.log('index page onHide()');
},
onDestroy() {
//发送页面销毁时间
......@@ -88,7 +97,7 @@ export default {
if (!_this.canReceiveMessage) {
return;
}
//接到手机端消息时(去掉17初始化的事件),启动页显示完后,不显示提示登录页面page 12
//接到手机端消息时(去掉17初始化的事件),启动页显示完后,不显示提示登录页面page 11
if (msg.eventFlg != "") {
_this.isJumpLoginPage = false;
}
......@@ -125,7 +134,7 @@ export default {
if (_this.lastPage != "") { //有可能是手机离开页面的15事件,手表端没有收到,所以导致lastpage没有值,这时候按训练中的页面算
_this.page = _this.lastPage;
}
if (_this.page != "3" && _this.page != "4" && _this.page != "5" && _this.page != "6" && _this.page != "7" && _this.page != "8") { //其他场合,全都重置页面page
if (_this.page != "1" && _this.page != "2" && _this.page != "3" && _this.page != "4" && _this.page != "5" && _this.page != "6" && _this.page != "7" && _this.page != "8") { //其他场合,全都重置页面page
_this.page = "2";
_this.acName = "";
}
......@@ -136,15 +145,9 @@ export default {
if (msg.eventFlg == "15" && model.rollbackStop != '0') {
_this.isPhoneLeave = true;
}
//完成训练停止接受10、15事件
if (_this.isEnd) {
if (msg.eventFlg == "10" || msg.eventFlg == "15") {
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 (msg.eventFlg == "1" || msg.eventFlg == "2" || msg.eventFlg == "3" || msg.eventFlg == "4" || msg.eventFlg == "5" || msg.eventFlg == "6" || msg.eventFlg == "7" || msg.eventFlg == "8") {
if (!_this.dataPageShow) {
_this.dataPageShow = true;
}
......@@ -152,14 +155,12 @@ export default {
_this.dataPageShow = false;
}
}
// _this.sendErrMsg(msg.eventFlg,"手表端处理接收到的消息类型:");
switch (msg.eventFlg) {
case "0": //训练准备
_this.page = "0";
break;
case "1": //训练准备后的倒计时
_this.countdownT = model.countdownT;
_this.isEnd = false;
_this.stopFlg = false;
_this.page = "1";
break;
......@@ -183,7 +184,6 @@ export default {
break;
case "5": //训练动作倒计时
_this.acName = model.acName;
_this.acType = model.acType;
if (model.acType == "0") {
_this.countdownT = model.acCnt + "/" + model.acTotalCnt;
} else {
......@@ -194,31 +194,32 @@ export default {
case "6": //休息中
_this.acName = model.acName;
_this.countdownT = model.countdownT;
_this.acType = 1;
_this.page = "6";
break;
case "7": //暂停
_this.tabIndex = 1;
_this.stopFlg = true;
//如果暂停的时候,正在准备开始训练或倒计时的场合,需要隐藏这个页面
if (_this.page == "0" || _this.page == "1") {
if (_this.page == "0") {
_this.page = "2";
}
break;
case "8": //继续
_this.countdownT = model.countdownT;
_this.tabIndex = 0;
_this.countdownT = "3";
_this.stopFlg = false;
break;
case "9": //完成训练
_this.vibrate();
_this.canReceiveMessage = false;
_this.isEnd = true;
_this.fitTotalDuration = model.fitTotalDuration;
_this.averHeartRate = _this.getAverHeartRate(_this.heartRateList); //平均心率
_this.maxHeartRate = _this.getMaxHeartRatet(_this.heartRateList); //最高心率
_this.acCalorie = model.acCalorie;
_this.quit();
_this.page = "9";
router.replace({
uri: "pages/end/end",
params: {
endTotalTime: model.fitTotalDuration, //训练时间
endAverHeartRate: _this.getAverHeartRate(_this.heartRateList), //平均心率
endMaxHeartRate: _this.getMaxHeartRatet(_this.heartRateList), //最高心率
endCalorie: model.acCalorie, //消耗心率
}
});
break;
case "10": //退出训练
_this.page = "10";
......@@ -228,7 +229,7 @@ export default {
_this.page = "11";
break;
case "12": //退出登录
_this.page = "12";
_this.page = "11";
_this.quit();
break;
case "13": //进度条
......@@ -250,7 +251,7 @@ export default {
}
break;
case "16": //杀掉进程
_this.page = "12";
_this.page = "11";
_this.quit();
break;
case "17": //播放初始化、注册心率
......@@ -261,60 +262,58 @@ export default {
},
/**
发送短消息给客户端
*/
sendMsg(obj) {
* 检测对端设备侧是否已经安装指定应用
*/
checkInstall() {
let _this = this;
_this.sendFlg = true;
FeatureAbility.sendMsg({
deviceId: 'remote',
FeatureAbility.detect({
bundleName: 'com.sportq.fit',
message: JSON.stringify(obj),
success: function () {
_this.sendFlg = false;
console.log('sendMsg success.');
//已安装
},
fail: function (data, code) {
_this.sendFlg = false;
console.log('handing fail, message: ' + data + ', code: ' + code);
}
if (!data && !code) { //未安装
_this.page = "99";
_this.isJumpLoginPage = false;
}
},
});
},
/**
发送心率消息
发送短消息给客户端
*/
sendHeartRateMsg(obj) {
sendMsg(obj) {
let _this = this;
_this.sendFlg = true;
FeatureAbility.sendMsg({
deviceId: 'remote',
bundleName: 'com.sportq.fit',
message: JSON.stringify(obj),
success: function () {
_this.sendFlg = false;
console.log('sendMsg success.');
},
fail: function (data, code) {
_this.sendFlg = false;
console.log('handing fail, message: ' + data + ', code: ' + code);
}
});
},
/**
* 把错误信息发送至客户端
发送心率消息
*/
sendErrMsg(data, code) {
sendHeartRateMsg(obj) {
let _this = this;
FeatureAbility.sendMsg({
deviceId: 'remote',
bundleName: 'com.sportq.fit',
message: JSON.stringify({
"errData": data,
"errCode": code,
}),
message: JSON.stringify(obj),
success: function () {
console.log('sendErrMsg success.');
},
fail: function (data, code) {
console.log('handing fail, message: ' + data + ', code: ' + code);
}
});
},
......@@ -340,7 +339,6 @@ export default {
let _this = this;
FeatureAbility.subscribeMsg({
success: function (data) {
// _this.sendErrMsg(data.message,"手表端接收到消息数据:");
_this.start(JSON.parse(data.message));
},
fail: function (data, code) {
......@@ -371,9 +369,8 @@ export default {
_this.newHeartRate = "--";
}
})
}
},
,
/**
*计算平均心率
*/
......@@ -407,9 +404,9 @@ export default {
} else {
return "--"
}
}
},
,
/**
*暂停
*/
......@@ -420,21 +417,22 @@ export default {
this.sendMsg({
"eventFlg": "3",
})
}
},
,
/**
*播放
*/
play() {
this.tabIndex = 0;
this.isStop = false;
this.stopFlg = false;
this.sendMsg({
"eventFlg": "4",
})
}
},
,
/**
*关闭
*/
......@@ -446,9 +444,9 @@ export default {
"eventFlg": "5",
});
this.quit();
}
},
,
/**
*上一个动作
*/
......@@ -456,9 +454,9 @@ export default {
this.sendMsg({
"eventFlg": "1",
})
}
},
,
/**
*下一个动作
*/
......@@ -466,9 +464,15 @@ export default {
this.sendMsg({
"eventFlg": "2",
})
}
},
,
/**
*介绍页开始训练
*/
introStart() {
this.page = "98";
this.tabIndex = 0;
},
/**
*震动
......@@ -483,8 +487,6 @@ export default {
});
},
,
/**
*数据重置
*/
......@@ -514,8 +516,8 @@ export default {
this.isStop = false;
this.sendFlg = false;
this.stopFlg = false;
this.isEnd = false;
this.isPhoneLeave = false;
this.acCalorie = "0";
},
/**
......@@ -537,21 +539,12 @@ export default {
if (timer != null) {
clearInterval(timer);
}
}
,
/**
*完成
*/
end() {
this.page = '10';
},
/**
*swiper滑动
*/
swiperChange(index) {
console.info(index);
this.tabIndex = index.index;
},
......
-----BEGIN NEW CERTIFICATE REQUEST-----
MIIBTTCB8gIBADBgMR0wGwYDVQQDDBRodWF3ZWlfd2F0Y2ggUmVsZWFzZTEhMB8G
A1UECxMYSE9TIERldmVsb3BtZW50IElERSBUZWFtMQ8wDQYDVQQKEwZIdWF3ZWkx
CzAJBgNVBAYTAkNOMFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAE3lqWvN9ND6Eg
8puC54BnoS87dZHNgu4tTEYJGmoep2SwAJ+9Ei51fL1QVXRXtf2M0bdmnT73kkPw
Lj99S3RlRaAwMC4GCSqGSIb3DQEJDjEhMB8wHQYDVR0OBBYEFCcWToDapEKNAvuQ
F2JJFDl85x/bMAwGCCqGSM49BAMCBQADSAAwRQIhAJ3kDnTtmDLJxO0vltECjQPU
6CK6j0j+fz4oYCW8WEs2AiB4Dzt/cJB7KVeDKtON3k/cVCWCCW2kV1wzao1mbPp+
4w==
-----END NEW CERTIFICATE REQUEST-----
-----BEGIN NEW CERTIFICATE REQUEST-----
MIIBVzCB+wIBADBpMSYwJAYDVQQDDB1odWF3ZWlfd2F0Y2hfb3ZlcnNlYXMgUmVs
ZWFzZTEhMB8GA1UECxMYSE9TIERldmVsb3BtZW50IElERSBUZWFtMQ8wDQYDVQQK
EwZIdWF3ZWkxCzAJBgNVBAYTAkNOMFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAE
olt19EluYq4ESwK1ZoBFss25UzfoS0Oi/5FqM/LSqZHLhwBdzj6DuzxWzg//WqR8
fUyVKOHveWsq74eqPZsrRKAwMC4GCSqGSIb3DQEJDjEhMB8wHQYDVR0OBBYEFPTJ
+4U7Sw0c58w1Q3q8p+1NBEsfMAwGCCqGSM49BAMCBQADSQAwRgIhALzrycPCGQ3q
cruxhj6xO9PDH1LnxP0834f+WQu9z5BfAiEA2E/N28Q8OEwyHzLQSm0wTv43I2gi
x9QZsupj1wVGU0c=
-----END NEW CERTIFICATE REQUEST-----
## This file must *NOT* be checked into Version Control Systems,
# as it contains information specific to your local configuration.
#
# Location of the SDK. This is only used by Gradle.
# For customization when using a Version Control System, please read the
# header note.
#Fri Sep 25 14:02:18 CST 2020
hwsdk.dir=C\:\\Users\\Administrator\\AppData\\Local\\Huawei\\Sdk
nodejs.dir=C\:\\Program Files\\nodejs
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