You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

101 lines
2.4 KiB

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

<template>
<view class="primask">
<!-- 首次进入app 隐私协议弹框 -->
<uni-popup ref="privacyDialog" type="dialog" >
<uni-popup-dialog :before-close="true" type="info" mode="base" cancelText="暂不同意并退出APP" confirmText="同意并接受" title="用户协议和隐私政策"
@confirm="agreeEnter"
@close="exitapply">
<view class="privacy_con">
<view class="content_privacy">
<text>欢迎使用瑜伽汇APP!本应用尊重并保护所有用户的个人隐私权。为了给您提供更准确、更有个性化的服务,本应用会按照隐私政策的规定使用和披露您的个人信息。可阅读</text>
<navigator url="/pages/user/infofw" class="navigator">《用户服务协议》</navigator>
<text>和</text>
<navigator url="/pages/user/infoys" class="navigator">《隐私政策条款》</navigator>
<text>了解详细信息。如果您同意,请点击下面按钮开始接受我们的服务。</text>
</view>
</view>
</uni-popup-dialog>
</uni-popup>
</view>
</template>
<script>
export default {
data() {
return {
};
},
mounted() {
this.$refs.privacyDialog.open();
},
methods: {
open(){
this.$refs.privacyDialog.open();
},
close(){
this.$refs.privacyDialog.close();
},
// 退出应用
exitapply(){
if (plus.os.name.toLowerCase() === 'android') {
plus.runtime.quit(); // 安卓退出应用
console.log('安卓');
} else {
console.log('ios');
plus.ios.import('UIApplication').sharedApplication().performSelector('exit'); // iOS退出应用
}
},
// 同意并进入应用
agreeEnter(){
let privacyType = uni.getStorageSync("privacyType");
if(privacyType=="1"){
uni.setStorageSync("firstLaunchFlag", true);
}
else if(privacyType=="2"){
uni.setStorageSync("firstLoginFlag", true);
}
plus.runtime.agreePrivacy()
this.close();
uni.navigateBack();
}
},
};
</script>
<style>
page {
background: transparent !important;
}
.primask {
position: fixed;
left: 0;
top: 0;
right: 0;
bottom: 0;
background: transparent !important;
width: 100%;
height: 100vh;
}
.privacy_con{
width: 630rpx;
background: f5f5f5;
border-radius: 32rpx;
}
.content_privacy{
width: 100%;
padding: 0 32rpx;
color: #232323;
font-size: 28rpx;
margin-top: 30rpx;
margin-bottom: 20rpx;
line-height: 42rpx;
}
.navigator {
color: #00a89b;
font-weight: 500;
display: inline-block;
}
</style>