153 lines
3.3 KiB
Vue
153 lines
3.3 KiB
Vue
<template>
|
||
<uni-popup ref="privacyPopup" type="center" :isMaskClick="false">
|
||
<view class="privacy-modal">
|
||
<view class="privacy-header">
|
||
<!-- <view class="badge">S</view> -->
|
||
<view class="privacy-title">隐私政策</view>
|
||
</view>
|
||
<scroll-view class="privacy-content" scroll-y="true">
|
||
<view class="privacy-text">
|
||
欢迎使用本应用,我们非常重视您的个人信息和隐私保护。在使用服务之前,请仔细阅读
|
||
<text class="privacy-link" @click="goAgreement(1)">《隐私政策》</text>
|
||
和
|
||
<text class="privacy-link" @click="goAgreement(2)">《用户协议》</text>
|
||
。我们将按照您同意的条款使用您的个人信息,以便为您提供服务。
|
||
<text class="privacy-subtext">
|
||
如您同意此政策,请点击“同意”开始使用我们的产品和服务;如您不同意,我们将无法为您提供完整服务。
|
||
</text>
|
||
</view>
|
||
|
||
</scroll-view>
|
||
<view class="privacy-actions">
|
||
<view class="submit-btn" @click="agree"> 同意 </view>
|
||
<!-- <button class="btn confirm" @click="agree">同意</button> -->
|
||
<view class="cancel" @click="exitApp">不同意</view>
|
||
</view>
|
||
</view>
|
||
</uni-popup>
|
||
</template>
|
||
|
||
<script setup>
|
||
import { ref, onMounted, onUnmounted } from 'vue';
|
||
|
||
const privacyPopup = ref();
|
||
const agree = () => {
|
||
uni.setStorageSync('privacy_agreed', 1);
|
||
uni.showTabBar();
|
||
privacyPopup.value && privacyPopup.value.close();
|
||
};
|
||
const exitApp = () => {
|
||
// #ifdef APP-PLUS
|
||
uni.showTabBar();
|
||
plus.runtime.quit();
|
||
// #endif
|
||
// #ifndef APP-PLUS
|
||
uni.showTabBar();
|
||
uni.reLaunch({
|
||
url: '/pages/index/index'
|
||
});
|
||
// #endif
|
||
};
|
||
const goAgreement = (type) => {
|
||
uni.navigateTo({
|
||
url: '/pages/home/agreement?type=' + type,
|
||
});
|
||
};
|
||
onMounted(() => {
|
||
const agreed = !!uni.getStorageSync('privacy_agreed');
|
||
if (!agreed) {
|
||
uni.hideTabBar();
|
||
setTimeout(() => {
|
||
privacyPopup.value && privacyPopup.value.open();
|
||
}, 50);
|
||
}
|
||
});
|
||
onUnmounted(() => {
|
||
uni.showTabBar();
|
||
});
|
||
</script>
|
||
<style scoped lang="scss">
|
||
.privacy-modal {
|
||
// width: 620rpx;
|
||
// max-height: 70vh;
|
||
background: #ffffff;
|
||
border-radius: 22rpx;
|
||
overflow: hidden;
|
||
margin: 0 80rpx;
|
||
}
|
||
|
||
.privacy-header {
|
||
padding-top: 36rpx;
|
||
align-items: center;
|
||
}
|
||
|
||
.badge {
|
||
width: 96rpx;
|
||
height: 96rpx;
|
||
margin: 0 auto;
|
||
border-radius: 48rpx;
|
||
background: linear-gradient(180deg, #e9f1ff 0%, #cfe0ff 100%);
|
||
color: #366EEE;
|
||
font-size: 42rpx;
|
||
font-weight: 700;
|
||
text-align: center;
|
||
line-height: 96rpx;
|
||
}
|
||
|
||
.privacy-title {
|
||
text-align: center;
|
||
font-size: 34rpx;
|
||
font-weight: 700;
|
||
padding: 18rpx 24rpx 6rpx;
|
||
color: #333;
|
||
}
|
||
|
||
.privacy-content {
|
||
// max-height: 48vh;
|
||
// margin: 8rpx 28rpx 0;
|
||
|
||
}
|
||
|
||
.privacy-text {
|
||
font-size: 26rpx;
|
||
line-height: 42rpx;
|
||
color: #666;
|
||
margin: 0 40rpx 12rpx;
|
||
}
|
||
|
||
.privacy-subtext {
|
||
font-size: 24rpx;
|
||
line-height: 40rpx;
|
||
color: #888;
|
||
}
|
||
|
||
.privacy-link {
|
||
color: #366EEE;
|
||
// text-decoration: underline;
|
||
}
|
||
|
||
.privacy-actions {
|
||
margin: 28rpx 40rpx;
|
||
|
||
.btn {
|
||
height: 88rpx;
|
||
border-radius: 12rpx;
|
||
font-size: 30rpx;
|
||
}
|
||
}
|
||
// .submit-btn{
|
||
// height: 88rpx;
|
||
// border-radius: 12rpx;
|
||
// text-align: center;
|
||
// line-height: 88rpx;
|
||
// color: #fff;
|
||
// background: linear-gradient(90deg,#FFA65B 0%, #366EEE 100%);
|
||
// }
|
||
|
||
.cancel {
|
||
color: #666;
|
||
font-size: 26rpx;
|
||
margin: 30rpx 0;
|
||
}
|
||
</style>
|