人工智能 网站建设,网站建设定义是什么意思,外贸加工订单,网站开发人员岗位使用uniapp打包ios 上架商店需要配置隐私协议政策弹窗。当用户点击确定后才能继续操作。 首先manifest.json中配置使用原生隐私政策提示框是不支持ios的。不用勾选。
解决思路#xff1a; 1、新建页面#xff1a;iosLogin.vue#xff0c;pages.json中 这个页面需要放在第一…使用uniapp打包ios 上架商店需要配置隐私协议政策弹窗。当用户点击确定后才能继续操作。 首先manifest.json中配置使用原生隐私政策提示框是不支持ios的。不用勾选。
解决思路 1、新建页面iosLogin.vuepages.json中 这个页面需要放在第一位 templateview classdialogview classbg/viewview classtitle服务协议和隐私政策/viewview classcontent请你务必审慎阅读、充分理解“服务协议”和“隐私政策”各条款包括但不限于为了更好的向你提供服务我们需要收集你的设备标识、操作日志等信息用于分析、优化应用性能。你可阅读text classlink clicklinkClick(1)《服务协议》/text和text classlink clicklinkClick(2)《隐私政策》/text了解详细信息。如果你同意请点击下面按钮开始接受我们的服务。/viewview classbtnbutton clickdisagree不同意并退出/buttonbutton clickagree同意/button/view/view
/template
scriptexport 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}typeuser_agreement)}else{let name2 encodeURIComponent(隐私政策)plus.runtime.openURL(https://h5.******.com.cn/pages/login/xieyi?title${name2}typeprivacy_agreement)}},agree() {uni.setStorageSync(agree, 1) // 设置缓存下次进入应用不再弹出this.$go(4,/pages/index/index?refCodethis.refCode); // 跳转首页},disagree(){// #ifdef APP-PLUSplus.ios.import(UIApplication).sharedApplication().performSelector(exit)// #endif}}}
/scriptstyle langscsspage {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;}}}
/styleapp.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消息这个不影响上架。