zouyanyan 1 week ago
parent 241a2c15c4
commit 33d84b1118

@ -32,8 +32,8 @@
},
onLaunch() {
// 判断版本更新 需要真机进行测试
//checkupdate();
//checkupdate();
// 极光推送start------------------------------
//#ifdef APP-PLUS
// 消息推送

@ -1,5 +1,5 @@
<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="隐私政策"
@confirm="agreeEnter"
@close="exitapply">
@ -55,6 +55,7 @@ export default {
</script>
<style lang="scss" scoped>
.privacy_con{
width: 630rpx;
background: linear-gradient(to bottom, #f5f5f5, #f5f5f5);

@ -492,7 +492,24 @@
"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" />
<!-- 首次进入app 隐私协议弹框 -->
<privacyAgreement ref="privacyPop"></privacyAgreement>
</view>
</template>
@ -93,15 +91,13 @@
import top from "../components/top.vue";
import service from "../components/service.vue";
import selShop from "../components/selShop.vue";
import privacyAgreement from "../../components/privacy-agreement.vue";
export default {
components: {
openlogin,
top,
service,
selShop,
privacyAgreement
selShop
},
data() {
return {
@ -203,8 +199,7 @@
},
};
},
onLoad() {
onLoad() {
var shop=myCache('shop');
var banner=shop&&shop.banner?shop.banner:"";
banner=banner.split(',');
@ -322,20 +317,21 @@
//调用子组件方法
this.$refs.topId.topData(e.scrollTop);
},
mounted() {
uni.setStorageSync("firstLaunchFlag", false)
mounted() {
let firstLaunchFlag = uni.getStorageSync("firstLaunchFlag");
// #ifdef APP-PLUS | H5
console.log("firstLaunchFlag", firstLaunchFlag);
uni.setStorageSync("firstLaunchFlag", false)
// 隐私政策判定start------------------------------
// #ifdef APP-PLUS
if (firstLaunchFlag) {
return
}else{
uni.showLoading({
mask: true
uni.navigateTo({
url: `/pages/user/privacy`
});
this.$refs.privacyPop.open();
}
// #endif
// 隐私政策判定end--------------
if(firstLaunchFlag){
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