Commit 127a0a41 authored by Sky's avatar Sky

添加隐私协议页面

parent a6e8b376
......@@ -5,9 +5,9 @@ ohos {
signingConfigs {
release {
storeFile file('D:/HuaweiWatchClient/huawei_watch_overseas.p12')
storePassword '0000001BA8DBFB85AF4C3C13D4E1154681D55F3BFAFF102F4A821F3435CA996DD0995FE410CA7C66E1C42F'
storePassword '0000001B503B0AACAAD0D4B58EB7F609102AC541D46F6D343EB7B1BD61F4474224D25E529303B19583CACA'
keyAlias 'huawei_watch_overseas Release'
keyPassword '0000001BE693BFFA074478CD0303FCA6F29E5C0DBFC29C097D218979DD9C1AF740EFAFC7EFFA3E9D74173A'
keyPassword '0000001B3AA6A1440F7D123658F67A747678A82E78FD809944573D62553DD5E15578F56BB028A9BDD746E0'
profile file('D:/HuaweiWatchClient/com.company.fit.provisionRelease.p7b')
certpath file('D:/HuaweiWatchClient/com.company.fit.overseas_release.cer')
signAlg 'SHA256withECDSA'
......
......@@ -6,16 +6,16 @@ ohos {
certpath file('D:/HuaweiWatchClient/com.company.fit.overseas_debug.cer')
profile file('D:/HuaweiWatchClient/com.company.fit.proDebug.p7b')
signAlg 'SHA256withECDSA'
keyPassword '0000001B91CB7A87C60FC999DDD2BCDBA8D578B5C8DBB818CE2CDC02F5190E08191F69238AAEDB019E9CB5'
keyPassword '0000001B73FE7C719EBDA135A3B71262B40C69EC1FE6E8C1DB55A01DA46E18A0FB0675806DF4CD475D834A'
keyAlias 'huawei_watch_overseas Release'
storePassword '0000001B274F149CB95174CB5174B918C3945F5514CB95A7CB8A0A65B239297CAE2F3697FD27046A3E4B74'
storePassword '0000001B85E0EA5D7382C8164C2D162BDA9E68658997D63B147A5B21E797348CD7D62C04A7410DBFF35A96'
storeFile file('D:/HuaweiWatchClient/huawei_watch_overseas.p12')
}
release {
storeFile file('D:/HuaweiWatchClient/huawei_watch_overseas.p12')
storePassword '0000001BF3E0F7119A4D4AA09CA834CEE57597D549140F82F1D8A44B2C4048F81E7E353510DBC7AB282BB4'
storePassword '0000001BF3A5754B236C5D87A87C5950DDFE24353138A2039341335A4ACF2D2BE09D52616185E74E9468F1'
keyAlias 'huawei_watch_overseas Release'
keyPassword '0000001B2E7E1F6C1396C80A08713B5388FEB76CBD2F743AE67E39F510073793C9104EB4E0159E4FA12807'
keyPassword '0000001BF283570D280AE2565F3E5B776F34169882FDCA51767D01D6BC66B8BB70B623F79B65EAF16AD514'
signAlg 'SHA256withECDSA'
profile file('D:/HuaweiWatchClient/com.company.fit.provisionRelease.p7b')
certpath file('D:/HuaweiWatchClient/com.company.fit.overseas_release.cer')
......
......@@ -51,6 +51,49 @@
text-align: center;
justify-content: center;
}
.privacy {
width: 454px;
height: 454px;
flex-direction: column;
align-items: center;
justify-content: center;
}
.privacy-img {
width: 454px;
height: 80px;
}
.privacy-content {
width: 350px;
margin-top: 18px;
text-align: center;
justify-content: center;
font-size: 38px;
color: #FFFFFF;
}
.privacy-confirm-img {
width: 232px;
margin-top: 14px;
height: 80px;
}
.privacy-confirm-btn {
font-size: 30px;
color: #1D2023;
}
.privacy-cancel-btn {
width: 60px;
margin-top: 6px;
text-align: center;
justify-content: center;
font-size: 30px;
color: #FFD208;
}
.start-text {
font-size: 38px;
text-align: center;
......
<div class="container" onswipe="touchMove">
<!--启动页面-->
<image class="logo" if="!page" src="../../common/default_img.png"></image>
<image class="logo" if="!page && !showPrivacy" src="../../common/default_img.png"></image>
<!--启动页面-->
<!--准备开始-->
<div class="start" if="page == '0'">
<div class="start" if="page == '0'&& !showPrivacy">
<text class="start-text">
准备开始
</text>
</div>
<!--同步信息提示页面-->
<div class="sync" if="page == '10' || page == '11'">
<div class="sync" if="(page == '10' || page == '11') && !showPrivacy">
<image class="sync-img" src="../../common/hm_sync_img.png"></image>
<text class="sync-text01">
请在手机端Fit健身开始训练,训练数据将在手表端同步展示
......@@ -18,9 +18,20 @@
*目前仅支持华为手机
</text>
</div>
<!--隐私权限 -->
<div class="privacy" if="showPrivacy">
<image class="privacy-img" src="../../common/hm_privacy_img.png"></image>
<text class="privacy-content">
本应用由去动网络提供,不涉及任何敏感权限和隐私信息。点击同意开始使用。
</text>
<image class="privacy-confirm-img" src="../../common/btn_privacy_agree.png" @click="privacyAgree"></image>
<text class="privacy-cancel-btn" @click="privacyCancel">
取消
</text>
</div>
<!--准备开始end-->
<!-- 标题end -->
<swiper index="{{tabIndex}}" class="todo-wraper" if="dataPageShow" @change="swiperChange">
<swiper index="{{tabIndex}}" class="todo-wraper" if="dataPageShow && !showPrivacy" @change="swiperChange">
<!-- 动作预览 -->
<div class="train-view">
<text if="page == '2'||page == '3'" class="train-page-title">
......@@ -79,7 +90,7 @@
</div>
</swiper>
<!--切换圆点-->
<div class="select" if="dataPageShow">
<div class="select" if="dataPageShow && !showPrivacy">
<div if="{{tabIndex == 0}}" class="select-item select-item-active"></div>
<div if="{{tabIndex == 0}}" class="select-item"></div>
<div if="{{tabIndex == 1}}" class="select-item"></div>
......@@ -87,7 +98,7 @@
</div>
<!--切换圆点end-->
<!--训练切出-->
<div class="train-quit" if="page == '15'">
<div class="train-quit" if="page == '15' && !showPrivacy">
<image class="train-quit-icon" src="../../common/oppo_img_fit.png"></image>
<text class="train-quit-text">
请在手机上返回训练视频,继续您的训练
......@@ -95,14 +106,14 @@
</div>
<!--训练切出end-->
<!--暂停播放倒计时-->
<div class="train-down" if="page == '8'">
<div class="train-down" if="page == '8' && !showPrivacy">
<text class="train-down-text">
{{countdownT}}
</text>
</div>
<!---暂停播放倒计时end-->
<!--介绍页start-->
<stack class="stack-intro" if="page == '99'">
<stack class="stack-intro" if="page =='99' && !showPrivacy ">
<swiper class="swiper-intro" @change="swiperChange">
<div class="content-intro-div">
<image class="swper-intro-img01" src="../../common/hm_guide_01.png"></image>
......@@ -127,7 +138,7 @@
<!--介绍页end--
<!--未下载提示页start-->
<div class="start" if="page == '98'">
<div class="start" if="page == '98' && !showPrivacy">
<text class="download-text">
请在手机上下载Fit App
</text>
......
......@@ -3,6 +3,7 @@ import vibrator from '@system.vibrator'; //震动
import brightness from '@system.brightness' //保持屏幕常亮
import app from '@system.app' //右滑退出
import router from '@system.router' //页面跳转
import storage from '@system.storage' //本地数据
var timer;
......@@ -29,9 +30,12 @@ export default {
dataPageShow: false, //训练数据页面是否显示
canReceiveMessage: true, //是否可以接收手机端其他事件(手表端主动暂停或训练结束后,不再接收除17外的其他事件)
isFirstInit: true, //是否是第一次初始化事件
showPrivacy: false, //显示隐私权限页面
},
onReady() {
let _this = this;
//获取本地隐私权限标识
_this.getPrivacyTag();
//数据重置
_this.restore();
//手机端是否安装了Fit
......@@ -94,16 +98,15 @@ export default {
let _this = this;
let model = msg.acModel;
//保持屏幕常亮
if (timer == null) {
_this.keepScreenOn();
timer = setInterval(function () {
_this.keepScreenOn();
},2 * 60 * 1000);
}
//手表端主动关闭训练后,不接收除17外的初始化事件,
if (msg.eventFlg == "17") {
//保持屏幕常亮
if (timer == null) {
_this.keepScreenOn();
timer = setInterval(function () {
_this.keepScreenOn();
},2 * 60 * 1000);
}
//数据重置
_this.init();
_this.canReceiveMessage = true;
......@@ -112,6 +115,7 @@ export default {
_this.page = "11";
}
}
//未初始化,不能接收事件
if (!_this.canReceiveMessage) {
return;
}
......@@ -283,6 +287,27 @@ export default {
}
},
/**
* 获取隐私权限本地标识
*/
getPrivacyTag() {
let _this = this;
storage.get({
key: "privacy_key",
success: function (data) {
//本地隐私权限是否同意的标识
_this.showPrivacy = data != '1';
},
fail: function (data, code) {
console.log("call storage.get fail, code: " + code + ", data: " + data);
},
complete: function () {
console.log("call complete");
}
});
},
/**
* 检测对端设备侧是否已经安装指定应用
*/
......@@ -574,6 +599,40 @@ export default {
}
},
/**
*同意隐私协议
*/
privacyAgree() {
this.showPrivacy = false;
storage.set({
key: "privacy_key",
value: "1",
success: function () {
console.log("call storage.set success.");
},
fail: function (data, code) {
console.log("call storage.set fail, code: " + code + ", data: " + data);
}
});
},
/**
*不同意隐私协议
*/
privacyCancel() {
storage.set({
key: "privacy_key",
value: "0",
success: function () {
console.log("call storage.set success.");
},
fail: function (data, code) {
console.log("call storage.set fail, code: " + code + ", data: " + data);
}
});
app.terminate();
},
/**
*swiper滑动
*/
......
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