刚写了一段dome,可以参考参考,一起交流 import { ref, nextTick, onMounted } from "vue"; const modelRef = ref(); const resolvePrivacyAuthorization = ref(); // 获取协议设置 wx.getPrivacySetting({ success: v => { if(v.needAuthorization || true) { nextTick(() => { modelRef.value?.open(); }) } } }) wx.onNeedPrivacyAuthorization(resolve => { resolvePrivacyAuthorization.value = resolve; }) // 模拟请求 wx.requirePrivacyAuthorize(); // 统一上报 const handleAgreePrivacyAuthorization = (e) => { resolvePrivacyAuthorization.value && resolvePrivacyAuthorization.value({ buttonId: 'agree-btn', event: 'agree' }); modelRef.value?.close(); } const openPrivacyContract = () => { wx.openPrivacyContract(); }
今天早上的时间是这么没的?打开软件,运行代码,选择照片,提示chooseAndUploadFile:fail api scope is not declared in the privacy agreement,然后一直搜索,为啥,搜索了一小时,然后发现是隐私授权,然后又看隐私授权,看了一上午,没看明白,看别人反馈,授权还一堆BUG,还需要自己写弹窗,看官方demo真是无语,看不懂,官方程序员这么懒了么,好了,又是白忙活的一天
2023-08-16刚写了一段dome,可以参考参考,一起交流 import { ref, nextTick, onMounted } from "vue"; const modelRef = ref(); const resolvePrivacyAuthorization = ref(); // 获取协议设置 wx.getPrivacySetting({ success: v => { if(v.needAuthorization || true) { nextTick(() => { modelRef.value?.open(); }) } } }) wx.onNeedPrivacyAuthorization(resolve => { resolvePrivacyAuthorization.value = resolve; }) // 模拟请求 wx.requirePrivacyAuthorize(); // 统一上报 const handleAgreePrivacyAuthorization = (e) => { resolvePrivacyAuthorization.value && resolvePrivacyAuthorization.value({ buttonId: 'agree-btn', event: 'agree' }); modelRef.value?.close(); } const openPrivacyContract = () => { wx.openPrivacyContract(); }
求求大佬救救孩子吧!小程序隐私协议这块,前端要怎么弄,流程大概要是个什么样子啊?怎么兼容低版本啊?https://developers.weixin.qq.com/community/develop/doc/00042e3ef54940ce8520e38db61801 https://developers.weixin.qq.com/miniprogram/dev/framework/user-privacy/PrivacyAuthorize.html 我一进页面就会有定位的授权弹窗,所以我是不 是要先查询用户是否有待同意的隐私政策信息 wx.getPrivacySetting,如果有没同意的弹出隐私协议的窗口,用户同意后,弹出授权定位窗口?如果用户拒绝,那我这个小程序直接关闭还是要怎么样? 还有就是怎么向下兼容?用户的版本低于 8.0.38时wx.openPrivacyContract , wx.getPrivacySetting等方法无法调用时我自己写一个《小程序用户隐私保护指引》页面吗?我写了一个,怎么让小程序后台知道我已经让用户看过并同意了呢?
2023-08-16刚写了一段dome,可以参考参考,一起交流 <template> <uni-popup ref="modelRef" type="center" :is-mask-click="false"> <view class="model"> <view class="model-title">个人隐私保护说明</view> <view class="model-content"> 欢迎您使用xxxx,为了更好的为您提供服务,请先阅读并同意<text @click="openPrivacyContract">《隐私保护说明》</text> </view> <button class="model-btn" id="agree-btn" open-type="agreePrivacyAuthorization" @agreeprivacyauthorization="handleAgreePrivacyAuthorization">我知道了</button> </view> </uni-popup> </template> <script setup> import { ref, nextTick, onMounted } from "vue"; const modelRef = ref(); const resolvePrivacyAuthorization = ref(); // 获取协议设置 wx.getPrivacySetting({ success: v => { if(v.needAuthorization || true) { nextTick(() => { modelRef.value?.open(); }) } } }) wx.onNeedPrivacyAuthorization(resolve => { resolvePrivacyAuthorization.value = resolve; }) // 模拟请求 wx.requirePrivacyAuthorize(); // 统一上报 const handleAgreePrivacyAuthorization = (e) => { resolvePrivacyAuthorization.value && resolvePrivacyAuthorization.value({ buttonId: 'agree-btn', event: 'agree' }); modelRef.value?.close(); } const openPrivacyContract = () => { wx.openPrivacyContract(); } </script> <style lang="scss"> .model { width: 640rpx; background-color: #ffffff; border-radius: 24rpx; overflow: hidden; &-title { font-size: 32rpx; font-weight: 600; color: #212121; text-align: center; padding-top: 24rpx; } &-content { font-size: 28rpx; font-weight: 400; line-height: 40rpx; color: #ADADAD; text-align: center; margin-top: 24rpx; padding: 0 48rpx; word-break: break-all; line-height: 52rpx; > text { color: #5BC8B0; } } &-btn { margin-top: 40rpx; display: flex; align-items: center; justify-content: center; color: #5BC8B0; background-color: #fff; border-top: 1rpx solid #EBEDF0; border-radius: 0; } } </style>
无法触发onNeedPrivacyAuthorization回调?为什么getPrivacySetting返回的是true,依然无法触发onNeedPrivacyAuthorization事件?[图片]
2023-08-16刚写了一段dome,可以参考参考,一起交流 <template> <uni-popup ref="modelRef" type="center" :is-mask-click="false"> <view class="model"> <view class="model-title">个人隐私保护说明</view> <view class="model-content"> 欢迎您使用xxxx,为了更好的为您提供服务,请先阅读并同意<text @click="openPrivacyContract">《隐私保护说明》</text> </view> <button class="model-btn" id="agree-btn" open-type="agreePrivacyAuthorization" @agreeprivacyauthorization="handleAgreePrivacyAuthorization">我知道了</button> </view> </uni-popup> </template> <script setup> import { ref, nextTick, onMounted } from "vue"; const modelRef = ref(); const resolvePrivacyAuthorization = ref(); // 获取协议设置 wx.getPrivacySetting({ success: v => { if(v.needAuthorization || true) { nextTick(() => { modelRef.value?.open(); }) } } }) wx.onNeedPrivacyAuthorization(resolve => { resolvePrivacyAuthorization.value = resolve; }) // 模拟请求 wx.requirePrivacyAuthorize(); // 统一上报 const handleAgreePrivacyAuthorization = (e) => { resolvePrivacyAuthorization.value && resolvePrivacyAuthorization.value({ buttonId: 'agree-btn', event: 'agree' }); modelRef.value?.close(); } const openPrivacyContract = () => { wx.openPrivacyContract(); } </script> <style lang="scss"> .model { width: 640rpx; background-color: #ffffff; border-radius: 24rpx; overflow: hidden; &-title { font-size: 32rpx; font-weight: 600; color: #212121; text-align: center; padding-top: 24rpx; } &-content { font-size: 28rpx; font-weight: 400; line-height: 40rpx; color: #ADADAD; text-align: center; margin-top: 24rpx; padding: 0 48rpx; word-break: break-all; line-height: 52rpx; > text { color: #5BC8B0; } } &-btn { margin-top: 40rpx; display: flex; align-items: center; justify-content: center; color: #5BC8B0; background-color: #fff; border-top: 1rpx solid #EBEDF0; border-radius: 0; } } </style>
隐私保护问题有些不太理解,没有使用官方组件收集算是收集隐私吗?[图片] 这个隐私保护中收集地址(wx.chooseAddress)和收集手机号 (<button open-type="getPhoneNumber">、<button open-type="getRealtimePhoneNumber"> )并没有使用官方给的组件和接口,使用了input 用户报名时填写的表单也算是收集了隐私了吗?需要有隐私弹框吗?
2023-08-16刚写了一段dome,可以参考参考,一起交流 <template> <uni-popup ref="modelRef" type="center" :is-mask-click="false"> <view class="model"> <view class="model-title">个人隐私保护说明</view> <view class="model-content"> 欢迎您使用xxxx,为了更好的为您提供服务,请先阅读并同意<text @click="openPrivacyContract">《隐私保护说明》</text> </view> <button class="model-btn" id="agree-btn" open-type="agreePrivacyAuthorization" @agreeprivacyauthorization="handleAgreePrivacyAuthorization">我知道了</button> </view> </uni-popup> </template> <script setup> import { ref, nextTick, onMounted } from "vue"; const modelRef = ref(); const resolvePrivacyAuthorization = ref(); // 获取协议设置 wx.getPrivacySetting({ success: v => { if(v.needAuthorization || true) { nextTick(() => { modelRef.value?.open(); }) } } }) wx.onNeedPrivacyAuthorization(resolve => { resolvePrivacyAuthorization.value = resolve; }) // 模拟请求 wx.requirePrivacyAuthorize(); // 统一上报 const handleAgreePrivacyAuthorization = (e) => { resolvePrivacyAuthorization.value && resolvePrivacyAuthorization.value({ buttonId: 'agree-btn', event: 'agree' }); modelRef.value?.close(); } const openPrivacyContract = () => { wx.openPrivacyContract(); } </script> <style lang="scss"> .model { width: 640rpx; background-color: #ffffff; border-radius: 24rpx; overflow: hidden; &-title { font-size: 32rpx; font-weight: 600; color: #212121; text-align: center; padding-top: 24rpx; } &-content { font-size: 28rpx; font-weight: 400; line-height: 40rpx; color: #ADADAD; text-align: center; margin-top: 24rpx; padding: 0 48rpx; word-break: break-all; line-height: 52rpx; > text { color: #5BC8B0; } } &-btn { margin-top: 40rpx; display: flex; align-items: center; justify-content: center; color: #5BC8B0; background-color: #fff; border-top: 1rpx solid #EBEDF0; border-radius: 0; } } </style>
调试库升级到3.0.0 后getFuzzyLocation,真机调试和体验版报错{"errMsg": "getFuzzyLocation:fail privacy permission is not authorized", "errno": 104}
2023-08-16https://developers.weixin.qq.com/miniprogram/dev/api/open-api/privacy/wx.requirePrivacyAuthorize.html 微信新增了规则,需要用户阅读过隐私协议后才能够获取用户的隐私权限类的API
uni.chooseImage?你好,请问,之前我的小程序上传图片或者上传文件都是没有问题的,但是今天为什么都不出现选择文件的弹窗了,直接相当于不执行uni.chooseImage这个api
2023-08-16https://developers.weixin.qq.com/miniprogram/dev/api/open-api/privacy/wx.requirePrivacyAuthorize.html 微信新增了规则,需要用户阅读过隐私协议后才能够获取用户的隐私权限类的API
chooseMessageFile需要获取用户的哪个权限?chooseMessageFile需要获取用户的哪个权限? 还有chooseImage需要哪个权限? 现在这两个接口由于权限原因都不能用了,但是在文档里面没找到应该获取的授权信息
2023-08-16https://developers.weixin.qq.com/miniprogram/dev/api/open-api/privacy/wx.requirePrivacyAuthorize.html 微信新增了规则,需要用户阅读过隐私协议后才能够获取用户的隐私权限类的API
wx.chooseMessageFile今天突然用不了了 提示这个 要怎么处理?{"errMsg": "chooseMessageFile:fail api scope is not declared in the privacy agreement", "errno": 112}
2023-08-16https://developers.weixin.qq.com/miniprogram/dev/api/open-api/privacy/wx.requirePrivacyAuthorize.html 微信新增了规则,需要用户阅读过隐私协议后才能够获取用户的隐私权限类的API
调用openBluetoothAdapter一直提示104?调用openBluetoothAdapter提示: {errMsg: "openBluetoothAdapter:fail privacy permission is not authorized", errno: 104},突然间就不行了,不知道官方又改了什么,隐私是填写成功了的,苹果手机微信权限和定位权限也是打开了的。 AppID(小程序ID):wxdfb406b86ce4e3f3 [图片][图片]
2023-08-16https://developers.weixin.qq.com/miniprogram/dev/api/open-api/privacy/wx.requirePrivacyAuthorize.html 微信新增了规则,需要用户阅读过隐私协议后才能够获取用户的隐私权限类的API
wx.getLocation 相关权限已添加 还报这个错 之前上线了的版本不影响 今天突然不能用了?{errMsg: "getLocation:fail privacy permission is not authorized", errno: 104}
2023-08-16