zouyanyan 1 week ago
parent 241a2c15c4
commit 33d84b1118

@ -1,5 +1,5 @@
<template> <template>
<uni-popup ref="privacyDialog" type="dialog"> <uni-popup ref="privacyDialog" type="dialog" style="top:0; bottom: 0;z-index: 9999;">
<uni-popup-dialog :before-close="true" type="info" mode="base" cancelText="暂不同意并退出APP" confirmText="同意并接受" title="隐私政策" <uni-popup-dialog :before-close="true" type="info" mode="base" cancelText="暂不同意并退出APP" confirmText="同意并接受" title="隐私政策"
@confirm="agreeEnter" @confirm="agreeEnter"
@close="exitapply"> @close="exitapply">
@ -55,6 +55,7 @@ export default {
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.privacy_con{ .privacy_con{
width: 630rpx; width: 630rpx;
background: linear-gradient(to bottom, #f5f5f5, #f5f5f5); background: linear-gradient(to bottom, #f5f5f5, #f5f5f5);

@ -492,7 +492,24 @@
"enablePullDownRefresh": false "enablePullDownRefresh": false
} }
}, },
{
"path" : "pages/user/privacy",
"style": {
"navigationStyle": "custom",
"backgroundColor": "transparent",
"app-plus": {
"background": "transparent",
"backgroundColorTop": "transparent",
"backgroundColorBottom": "transparent",
"titleNView": false,
"animationType": "fade-in",
"popGesture": "none",
"webviewBGTransparent": true,
"mask": "none",
"bounce": "none"
}
}
},
// ……其他页面配置 更新版本 // ……其他页面配置 更新版本
{ {

@ -80,8 +80,6 @@
<u-toast ref="uToast" /> <u-toast ref="uToast" />
<!-- 首次进入app 隐私协议弹框 -->
<privacyAgreement ref="privacyPop"></privacyAgreement>
</view> </view>
</template> </template>
@ -93,15 +91,13 @@
import top from "../components/top.vue"; import top from "../components/top.vue";
import service from "../components/service.vue"; import service from "../components/service.vue";
import selShop from "../components/selShop.vue"; import selShop from "../components/selShop.vue";
import privacyAgreement from "../../components/privacy-agreement.vue";
export default { export default {
components: { components: {
openlogin, openlogin,
top, top,
service, service,
selShop, selShop
privacyAgreement
}, },
data() { data() {
return { return {
@ -204,7 +200,6 @@
}; };
}, },
onLoad() { onLoad() {
var shop=myCache('shop'); var shop=myCache('shop');
var banner=shop&&shop.banner?shop.banner:""; var banner=shop&&shop.banner?shop.banner:"";
banner=banner.split(','); banner=banner.split(',');
@ -323,19 +318,20 @@
this.$refs.topId.topData(e.scrollTop); this.$refs.topId.topData(e.scrollTop);
}, },
mounted() { mounted() {
uni.setStorageSync("firstLaunchFlag", false)
let firstLaunchFlag = uni.getStorageSync("firstLaunchFlag"); let firstLaunchFlag = uni.getStorageSync("firstLaunchFlag");
// #ifdef APP-PLUS | H5 uni.setStorageSync("firstLaunchFlag", false)
console.log("firstLaunchFlag", firstLaunchFlag); // 隐私政策判定start------------------------------
// #ifdef APP-PLUS
if (firstLaunchFlag) { if (firstLaunchFlag) {
return return
}else{ }else{
uni.showLoading({ uni.navigateTo({
mask: true url: `/pages/user/privacy`
}); });
this.$refs.privacyPop.open();
} }
// #endif // #endif
// 隐私政策判定end--------------
if(firstLaunchFlag){ if(firstLaunchFlag){
if(this.userid==""||this.userid=="0"){ if(this.userid==""||this.userid=="0"){

@ -0,0 +1,94 @@
<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(){
uni.setStorageSync("firstLaunchFlag", 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>
Loading…
Cancel
Save