<template> <view class="start"> <view class="background"></view> <view class="popup"> <view class="title">温馨提示</view> <scroll-view :scroll-y="true" class="content"> <text>欢迎使用正一商城APP。我们非常重视您的用户权益和个人信息的保护,在您使用正一商城APP服务前,请认真阅读</text> <text class="money" @click="goUser">《用户协议》</text> <text>和</text> <text class="money" @click="goYs">《隐私政策》</text> <text> 全部条款。我们将通过上述协议向您说明我们如何为您提供服务并保障您的用户权益, 如何收集、使用、保存、共享和保护您的相关信息,以及我们为您提供的访问、更正、删除和申诉您信息相关问题的方式。 我们会严格按照您的授权,在上述协议约定的范围内收集、存储和使用您的注册信息、设备信息、位置信息、日志信息或其他经您授权的信息。 您点击“同意并继续”视为您已同意上述协议的全部内容 </text> </scroll-view> <view class="button flex"> <text class="disagree" @click="disagree">不同意</text> <text class="agree" @click="agree">同意并继续</text> </view> </view> </view> </template> <script> export default { data() { return {}; }, onLoad() { let agree = uni.getStorageSync('agree'); if (agree) { // this.agree() console.log(uni.getStorageSync('agree'),'2222232'); uni.redirectTo({ url: '/pages/index/index' }); } }, methods: { //前往用户协议 goUser() { uni.navigateTo({ url: './agreement' }); }, goYs() { uni.navigateTo({ url: './privacy' }); }, //不同意 disagree() { plus.runtime.quit(); }, //同意 agree() { uni.setStorageSync('agree', true); uni.switchTab({ url: '/pages/index/index', success(e) { console.log(e); }, fail(e) { console.log(e); } }); } } }; </script> <style lang="scss"> .money { color: $base-color; } .disagree { padding: 10rpx 30rpx; font-size: 28rpx; width: 200rpx; height: 64rpx; color: $base-color; border-radius: 999rpx; border: 2rpx solid $base-color; } .agree { padding: 10rpx 30rpx; width: 210rpx; height: 64rpx; font-size: 28rpx; color: #fff; background-color: $base-color; border-radius: 999rpx; border: 2rpx solid $base-color; } .button { position: absolute; left: 0; right: 0; bottom: 0; z-index: 0; display: flex; padding: 24rpx; justify-content: center; text-align: center; justify-content: space-around; } .content { position: absolute; left: 0; right: 0; top: 100rpx; bottom: 120rpx; z-index: 0; font-size: 28rpx; padding: 0 50rpx; line-height: 44rpx; } .title { font-size: 36rpx; padding: 20rpx 50rpx; } .background { position: fixed; left: 0; right: 0; top: 0; bottom: 0; z-index: 0; background-color: rgba(0, 0, 0, 0.4); } .popup { position: absolute; z-index: 0; left: 50%; top: 50%; transform: translate(-50%, -50%); width: 600rpx; height: 700rpx; background-color: #fff; border-radius: 30rpx; } </style>