Commit 8c764baf authored by Sky's avatar Sky

添加隐私协议和同步信息弹窗

parent 127a0a41
......@@ -6,9 +6,9 @@ ohos {
certpath file('D:/HuaweiWatchClient/com.company.fit.overseas_debug.cer')
profile file('D:/HuaweiWatchClient/com.company.fit.proDebug.p7b')
signAlg 'SHA256withECDSA'
keyPassword '0000001B73FE7C719EBDA135A3B71262B40C69EC1FE6E8C1DB55A01DA46E18A0FB0675806DF4CD475D834A'
keyPassword '0000001BFD54082371D6C3EF63CF52276861294BB314DFB8E24964D38490F4A9B8C5A64BC7CF99E59911AB'
keyAlias 'huawei_watch_overseas Release'
storePassword '0000001B85E0EA5D7382C8164C2D162BDA9E68658997D63B147A5B21E797348CD7D62C04A7410DBFF35A96'
storePassword '0000001B8F12B362B740E5D2AD4F6EC6F7C47E4755999147E9481B1A98D997F59D08D4EE192272C503E00A'
storeFile file('D:/HuaweiWatchClient/huawei_watch_overseas.p12')
}
release {
......
......@@ -2,7 +2,7 @@
"app": {
"bundleName": "com.company.fit",
"version": {
"code": 10,
"code": 15,
"name": "1.0.1"
},
"apiVersion": {
......
......@@ -24,20 +24,18 @@
height: 454px;
flex-direction: column;
align-items: center;
justify-content: center;
}
.sync-img {
width: 150px;
height: 164px;
margin-top: 80px;
width: 116px;
height: 66px;
}
.sync-text01 {
width: 350px;
height: 120px;
margin-top: 24px;
margin-top: 48px;
text-align: center;
justify-content: center;
font-size: 30px;
color: #FFFFFF;
}
......@@ -45,11 +43,9 @@
.sync-text02 {
width: 350px;
margin-top: 12px;
height: 36px;
font-size: 30px;
color: rgba(250, 250, 250, 0.66);
text-align: center;
justify-content: center;
}
.privacy {
......@@ -57,37 +53,36 @@
height: 454px;
flex-direction: column;
align-items: center;
justify-content: center;
}
.privacy-img {
width: 454px;
height: 80px;
height: 76px;
}
.privacy-content {
width: 350px;
margin-top: 18px;
margin-top: 16px;
text-align: center;
justify-content: center;
font-size: 38px;
color: #FFFFFF;
}
.privacy-confirm-img {
width: 232px;
margin-top: 14px;
height: 80px;
width: 210px;
margin-top: 16px;
height: 70px;
}
.privacy-confirm-btn {
font-size: 30px;
color: #1D2023;
margin-top: 16px;
color: #FFD208;
}
.privacy-cancel-btn {
width: 60px;
margin-top: 6px;
margin-top: 16px;
text-align: center;
justify-content: center;
font-size: 30px;
......
......@@ -18,7 +18,6 @@ export default {
isLast: "", //是否第一个动作 "0":真 "1":假
isFirst: "", // 是否最后一个动作 "0":真 "1":假
fitDuration: "00:00", //训练持续时长
heartRateList: [], //心率数组
newHeartRate: "--", //当前心率
isStop: false, //是否是手表端暂停
sendFlg: false, // 是否在发送消息
......@@ -30,7 +29,7 @@ export default {
dataPageShow: false, //训练数据页面是否显示
canReceiveMessage: true, //是否可以接收手机端其他事件(手表端主动暂停或训练结束后,不再接收除17外的其他事件)
isFirstInit: true, //是否是第一次初始化事件
showPrivacy: false, //显示隐私权限页面
showPrivacy: true, //显示隐私权限页面
},
onReady() {
let _this = this;
......@@ -240,8 +239,8 @@ export default {
uri: "pages/end/end",
params: {
endTotalTime: model.fitTotalDuration, //训练时间
endAverHeartRate: _this.getAverHeartRate(_this.heartRateList), //平均心率
endMaxHeartRate: _this.getMaxHeartRate(_this.heartRateList), //最高心率
endAverHeartRate: model.averHeartRate, //平均心率
endMaxHeartRate: model.maxHeartRate, //最高心率
endCalorie: model.acCalorie, //消耗心率
}
});
......@@ -403,7 +402,6 @@ export default {
success: function (data) {
if (data.heartRate != 255) {
_this.newHeartRate = data.heartRate;
_this.heartRateList.push(data.heartRate);
} else {
_this.newHeartRate = "--";
}
......@@ -498,44 +496,6 @@ export default {
});
},
/**
*计算平均心率
*/
getAverHeartRate(arr) {
if (arr.length > 0) {
//将array的长度赋给len
let len = arr.length;
let sum = 0;
//利用for循环遍历数组的内容,利用sum累加求和
for (let i = 0; i < len; i++) {
sum += arr[i];
}
//返回数组的和与长度求平均值
return parseInt(sum / len);
} else {
return "--"
}
}
,
/**
*获取最大心率
*/
getMaxHeartRate(arr) {
if (arr.length > 0) {
let max = arr[0];
for (let i = 0; i < arr.length; i++) {
if (arr[i] > max) {
max = arr[i];
}
}
return parseInt(max)
} else {
return "--"
}
},
/**
*数据重置
*/
......@@ -551,7 +511,6 @@ export default {
this.fitDuration = "00:00";
this.progress = "", //进度条
this.countdownT = "", // 倒计时
this.heartRateList = [];
//取消接收手机侧第三方应用发过来的消息
FeatureAbility.unsubscribeMsg();
sensor.unsubscribeHeartRate() //取消监听心率
......@@ -583,7 +542,6 @@ export default {
this.progress = "", //进度条
this.countdownT = "", // 倒计时
this.newHeartRate = "--", //当前心率
this.heartRateList = [];
sensor.unsubscribeHeartRate() //取消监听心率
if (timer != null) {
clearInterval(timer);
......
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