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

深圳坪山网站制作公司南通网站设计公司

深圳坪山网站制作公司,南通网站设计公司,建设厅的电工证,网店装修教程免费模板使用uniapp打包ios 上架商店需要配置隐私协议政策弹窗。当用户点击确定后才能继续操作。 首先manifest.json中配置使用原生隐私政策提示框是不支持ios的。不用勾选。 解决思路: 1、新建页面:iosLogin.vue,pages.json中 这个页面需要放在第一…

使用uniapp打包ios 上架商店需要配置隐私协议政策弹窗。当用户点击确定后才能继续操作。
首先manifest.json中配置使用原生隐私政策提示框是不支持ios的。不用勾选
在这里插入图片描述

解决思路:

1、新建页面:iosLogin.vue,pages.json中 这个页面需要放在第一位

<template><view class="dialog"><view class="bg"></view><view class="title">服务协议和隐私政策</view><view class="content">请你务必审慎阅读、充分理解“服务协议”和“隐私政策”各条款,包括但不限于:为了更好的向你提供服务,我们需要收集你的设备标识、操作日志等信息用于分析、优化应用性能。你可阅读<text class="link" @click="linkClick(1)">《服务协议》</text><text class="link" @click="linkClick(2)">《隐私政策》</text>了解详细信息。如果你同意,请点击下面按钮开始接受我们的服务。</view><view class="btn"><button @click="disagree">不同意并退出</button><button @click="agree">同意</button></view></view>
</template>
<script>export default {data() {return {refCode:''}},onLoad(option) {if (option.refCode) {this.refCode = option.refCode;uni.setStorageSync('refCode', option.refCode);}},methods:{linkClick(num) {if(num == 1){let name1 = encodeURIComponent('用户协议')plus.runtime.openURL(`https://h5.******.com.cn/pages/login/xieyi?title=${name1}&type=user_agreement`)}else{let name2 = encodeURIComponent('隐私政策')plus.runtime.openURL(`https://h5.******.com.cn/pages/login/xieyi?title=${name2}&type=privacy_agreement`)}},agree() {uni.setStorageSync('agree', 1) // 设置缓存,下次进入应用不再弹出this.$go(4,'/pages/index/index?refCode='+this.refCode); // 跳转首页},disagree(){// #ifdef APP-PLUSplus.ios.import("UIApplication").sharedApplication().performSelector("exit")// #endif}}}
</script><style lang="scss">page {background: url('../../static/1.png')no-repeat left top #fff;background-size: 750rpx 1334rpx;position: relative;z-index: 2;.bg{position: fixed;left: 0;top: 0;z-index: -1;background: rgba(0, 0, 0, .5);width: 750rpx;height: 100vh;}}// 弹窗样式.dialog {margin: 0 auto;margin-top: calc(30vh);width: 600rpx;border-radius: 16rpx;background-color: #fff;.title {text-align: center;line-height: 80rpx;font-size: 32rpx;font-weight: 600;}.content {padding: 0 32rpx;text-indent: 1em;.link {color: #FF6840;}}.btn {display: flex;flex: 1;uni-button {margin: 0;flex: 1;background-color: #fff;}uni-button::after {border: none;}}}
</style>

app.vue

onLaunch: async function() {// #ifdef APP-PLUSconst platform = uni.getSystemInfoSync().osName// 判断是不是ios,并且是否同意了隐私政策let agree = uni.getStorageSync('agree')if (platform === 'android') {plus.navigator.closeSplashscreen() // 关闭启动页} else {if(agree){uni.reLaunch({url: "/pages/index/index",success() {plus.navigator.closeSplashscreen()}})}else{console.log('ios第一次启动需要同意隐私政策');// ios单独进行隐私政策验证uni.navigateTo({url: "/pages/login/iosLogin",success() {plus.navigator.closeSplashscreen()}})}}// #endif
},

提示:如果项目有用到消息提示类的功能,在确认隐私政策前可能会有弹窗提示 是否接收APP消息,这个不影响上架。

http://www.yayakq.cn/news/957753/

相关文章:

  • 为什么要找对做网站的公司烟台网站建设合肥公司
  • 常用网站名称大全广告策划ppt案例
  • 建设单位经常去哪个网站视频变成网站怎么做
  • 金阊苏州网站建设wordpress ide
  • 湛江建设培训学校网站天津高端网站建设公司
  • 百度 医疗网站建设北京中信建设有限责任公司
  • 知乎网站建设用的工具滕州市 网站建设公司
  • 花木网站源码网站开发人员工资
  • 十大ppt模板免费下载网站上海装饰公司排名百强
  • devexpress网站开发app制作软件破解版
  • 南山网站建设设计手机网站的建设
  • 建设网站去哪里找影视公司起名
  • 网站设计需求说明书企业网站轮播图怎么做
  • 石家庄网站制作视频佳木斯建设网站
  • 抄底券网站怎么做的建设网站是几个步骤
  • 镇江网站建设镇江建个站的免费网站能上百度吗
  • 网页游戏网站有哪些国际电商平台排行榜前十名
  • 湖南电子科技网站建设wordpress登录回复
  • 网站建设有哪些家手机百度官网
  • 网站初期 权重怎么做宣传片制作公司保定
  • 免费制作封面网站长沙柒零叁网站建设
  • 网站建设 样板网站建设需要会什么软件
  • 建立网站主机2003怎么建设网站空间
  • 深圳网站建设外贸wordpress用网站测速
  • 做网站挣钱打擦边球wordpress邮件配置
  • 备案网站主办者承诺书广州新塘网站建设
  • 上海营销型网站seowordpress编辑器怎么变
  • 北京网站建设 博客建网站系统平台
  • 萍乡专业的企业网站建设公司上海建站网站
  • 四川省住房和城乡建设网站河北关键词seo排名