uni-app华为审核被拒,驳回原因:您的应用在运行时,未见向用户告知权限申请的目的

华为审核被拒:
您的应用在运行时,未见向用户告知权限申请的目的,向用户索取(相机存)等权限,不符合华为应用市场审核标准。

在这里插入图片描述

<uni-popup ref="perpopup" type="center" :mask-click='false'>
				<view class="permissions_box">
					当您使用APP时,会在资料编辑、投诉、发布、意见反馈时访问存贮权限,不授权上述权限,不影响APP其他功能使用。
				</view>
			</uni-popup>

//比如,点击编辑头像的方法
//android.permission.READ_EXTERNAL_STORAGE是访问权限
panduan(){
					var that = this
					var platform = uni.getSystemInfoSync().platform
					if (platform=='android'){
						plus.android.checkPermission(
						        'android.permission.READ_EXTERNAL_STORAGE',
						        granted => {
						          if (granted.checkResult==-1){
						          	//弹出
									 that.$refs.perpopup.open('top')
								  }else{
									//执行你有权限后的方法
								  }
						        },
						        error => {
						          console.error('Error checking permission:', error.message);
						        }
						      );
						plus.android.requestPermissions(['android.permission.READ_EXTERNAL_STORAGE'],
							(e) => {
							//关闭
								that.$refs.perpopup.close()
								if (e.granted.length>0){
										//执行你有权限后的方法
								}
						})
					
					}else{
							//执行你有权限后的方法 ios
					}
					
			},
  • 9
    点赞
  • 11
    收藏
    觉得还不错? 一键收藏
  • 2
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 2
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值