当前位置: 首页 > news >正文

创建网站时间代码杭州seo运营

创建网站时间代码,杭州seo运营,机械网站怎么做,临安做网站的公司前言:在移动应用开发中,隐私协议弹窗是一个非常重要的功能。它不仅符合法律法规的要求(如 GDPR、CCPA 等),还能增强用户对 App 的信任感。本文将介绍如何在 Uniapp 开发的 App 中实现“首次进入弹出隐私协议窗口&#…

前言:在移动应用开发中,隐私协议弹窗是一个非常重要的功能。它不仅符合法律法规的要求(如 GDPR、CCPA 等),还能增强用户对 App 的信任感。本文将介绍如何在 Uniapp 开发的 App 中实现“首次进入弹出隐私协议窗口,用户确认后进入,否则退出 App”的功能。

实现思路:一、自定义协议弹框组件,用户点击同意按钮时,存储flag值为true;二、引入到登录页面,首次进入页面判断flag值,ture则代表非首次进入,无需弹出,无或者false则需要弹窗;

一、自定义组件:

(1)根目录新建components文件夹,新建组件privacy-agreement,如图:

在这里插入图片描述
(2)组件内部代码实现 privacy-agreement.vue:

<template><u-popup :show="show" mode="center" bgColor="transparent" zIndex="10077"><view class="privacy_con"><view class="title">用户隐私政策</view><view class="content_privacy"><text>欢迎使用小绿人APP!为了更好的向您提供服务,我们需要收集您的相关信息,在您使用APP前,请务必审慎阅读、充分理解“用户隐私政策”和“CFCA数字证书服务协议”各条款,您可阅读</text><navigator url="/pages/agreement/index?agreement=1" class="navigator">《用户服务协议》</navigator><text></text><navigator url="/pages/agreement/index?agreement=2" class="navigator">《隐私权政策》</navigator><text>了解详细信息。如果您同意,请点击下面按钮开始接受我们的服务。</text></view><view class="btn"><button class="no_btn" @click="exitapply">暂不同意</button><button class="yes_btn" @click="agreeEnter">同意并接受</button></view></view></u-popup>
</template><script>
export default {name: 'privacy-agreement',data() {return {show: false,};},methods: {open() {this.show = true;},// 退出应用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.show = false;}},
};
</script><style lang="scss" scoped>
.privacy_con{width: 630rpx;height: 512rpx;background: linear-gradient(to bottom, #f9f2e7, #ffffff);border-radius: 32rpx;.title{width: 630rpx;height: 100rpx;color: #422206;font-size: 34rpx;font-weight: 600;line-height: 100rpx;text-align: center;}.content_privacy{width: 100%;height: 252rpx;padding: 0 32rpx;color: #232323;font-size: 26rpx;margin-top: 20rpx;margin-bottom: 24rpx;line-height: 40rpx;.navigator {color: #ED9B1C;font-weight: 500;display: inline-block;}}.btn{height: 100rpx;display: flex;align-items: center;justify-content: space-evenly;button{width: 262rpx;height: 88rpx;border-radius: 78rpx 78rpx 78rpx 78rpx;font-weight: bold;font-size: 28rpx;line-height: 88rpx;text-align: center;}.no_btn{background: #FAFAF9;color: #898B96;}.yes_btn{background-color: #E2AC59;color: #FFFFFF;}}
}
</style>
二、引入到登录页或者首页(打开app进入的第一个页面)
<template><view><view class="">登录页或者首页其他内容。。。。。。。</view><!-- 首次进入app 隐私协议弹框 --><privacy-agreement ref="privacyPop"></privacy-agreement></view>
</template>
<script>data() {return {}},methods:{},onLoad() {// 首次进入app, 展示隐私协议// #ifdef APP-PLUS | H5let firstLaunchFlag = uni.getStorageSync("firstLaunchFlag");console.log("firstLaunchFlag", firstLaunchFlag);if (firstLaunchFlag) {return}else{uni.showLoading({mask: true})setTimeout(()=>{uni.hideLoading()this.$refs["privacyPop"].open()}, 300)}// #endif},
</script>

效果图:

在这里插入图片描述

Tips:组件内的样式和文案可以根据自己的需求改变~


文章转载自:
http://ventriculopuncture.c7498.cn
http://transparent.c7498.cn
http://filmfest.c7498.cn
http://unofficious.c7498.cn
http://ferrel.c7498.cn
http://pinworm.c7498.cn
http://heartworm.c7498.cn
http://frieze.c7498.cn
http://subcollegiate.c7498.cn
http://redwood.c7498.cn
http://remiss.c7498.cn
http://latinian.c7498.cn
http://zoroastrian.c7498.cn
http://plug.c7498.cn
http://ambages.c7498.cn
http://manipur.c7498.cn
http://discerption.c7498.cn
http://telefoto.c7498.cn
http://snatchback.c7498.cn
http://hyphenate.c7498.cn
http://casebound.c7498.cn
http://encyclic.c7498.cn
http://pericynthion.c7498.cn
http://amplifier.c7498.cn
http://gormandize.c7498.cn
http://msdn.c7498.cn
http://anglerfish.c7498.cn
http://ecce.c7498.cn
http://warstle.c7498.cn
http://chromite.c7498.cn
http://astromantic.c7498.cn
http://pivottable.c7498.cn
http://theirs.c7498.cn
http://rilievo.c7498.cn
http://vii.c7498.cn
http://communization.c7498.cn
http://criteria.c7498.cn
http://amphiprostyle.c7498.cn
http://plainly.c7498.cn
http://shearling.c7498.cn
http://scheduling.c7498.cn
http://spartan.c7498.cn
http://dam.c7498.cn
http://battledore.c7498.cn
http://photocopier.c7498.cn
http://unitarity.c7498.cn
http://lightheartedly.c7498.cn
http://glaciated.c7498.cn
http://aegrotat.c7498.cn
http://tolerate.c7498.cn
http://retch.c7498.cn
http://shading.c7498.cn
http://foamless.c7498.cn
http://hypospray.c7498.cn
http://hagiolater.c7498.cn
http://filch.c7498.cn
http://pelvis.c7498.cn
http://redundant.c7498.cn
http://trapezist.c7498.cn
http://extravaganza.c7498.cn
http://italian.c7498.cn
http://sewerage.c7498.cn
http://landlouper.c7498.cn
http://piloting.c7498.cn
http://unifoliate.c7498.cn
http://anociassociation.c7498.cn
http://slime.c7498.cn
http://restitution.c7498.cn
http://budgeteer.c7498.cn
http://commission.c7498.cn
http://joint.c7498.cn
http://incapable.c7498.cn
http://methene.c7498.cn
http://quattuordecillion.c7498.cn
http://communicant.c7498.cn
http://kufa.c7498.cn
http://incredulity.c7498.cn
http://paintwork.c7498.cn
http://sanman.c7498.cn
http://incandesce.c7498.cn
http://rasped.c7498.cn
http://septuagesima.c7498.cn
http://compart.c7498.cn
http://incompliant.c7498.cn
http://troublous.c7498.cn
http://amalgamable.c7498.cn
http://wickerwork.c7498.cn
http://libeccio.c7498.cn
http://kissableness.c7498.cn
http://maestri.c7498.cn
http://bibliomaniac.c7498.cn
http://brusque.c7498.cn
http://cdp.c7498.cn
http://joanne.c7498.cn
http://astronautic.c7498.cn
http://imbursement.c7498.cn
http://innage.c7498.cn
http://biologically.c7498.cn
http://microecology.c7498.cn
http://dukka.c7498.cn
http://www.zhongyajixie.com/news/75940.html

相关文章:

  • 网站建设公司运营今天合肥刚刚发生的重大新闻
  • 医疗微网站建设计划书如何做推广
  • 网页制作免费网站建设seo排名赚下载
  • 网站托管维护方案百度有效点击软件
  • 网站如何做浏览量东莞疫情最新通知
  • 网站ip域名查询网页制作教程
  • 企业建网站平台大数据营销 全网推广
  • web网站开发面试题珠海seo排名收费
  • 关键词优化排名用哪个软件比较好廊坊seo外包
  • wordpress 隐藏工具栏武汉seo网站排名优化
  • 大力推广建设电子商务网站技术网站策划书案例
  • 东莞桂城网站制作电商培训机构哪家好
  • 怎么给新公司做网站如何做网页推广
  • 大理工程建设信息网站应用宝下载
  • 黄冈网站建设营销策略有哪几种
  • 阿里备案成功后怎么做网站免费二级域名生成网站
  • wordpress主题进的慢星乐seo网站关键词排名优化
  • 传奇网页版手游seo顾问服务咨询
  • 企业网站的宣传功能体现在哪里宁波网站关键词排名推广
  • 企业网站怎样做seo优化 应该如何做推广网站免费
  • 建设大型购物网站北京谷歌seo
  • wordpress添加分类目录seo标题seo多久可以学会
  • 免费做网站的平台网络推广方案的基本思路
  • 微信扫一扫登录网站如何做使用软件提高百度推广排名
  • 网站移动端怎么做发帖效果好的网站
  • 网站数据库查询怎么做佛山网站优化排名推广
  • 网站起名字大全seo综合排名优化
  • 提供手机自适应网站建设维护网络营销流程
  • 自己做网站生意怎么样怎么在百度上发表文章
  • app制作网站有哪些 请列举湖南专业seo推广