小程序审核的时候被拒绝,说小程序登录功能暂未符合规范要求,在登录环节,应当为用户提供可取消或拒绝的选项按钮,
后来我用改成加入 uni.getUserInfo, 获取权限之后再 login
uni.getUserInfo({
desc:'获取微信用户的昵称',
provider: 'weixin',
success(res) {
uni.login({
provider: 'weixin',
.........
},
fail: () => {
uni.showToast({
title: '授权已取消',
icon: 'error',
mask: true
})
},
complete(res) {
console.log(res);
uni.hideLoading();
}
}
但是我测试的时候,发现点击按钮还是可以直接进入微信,就是不弹出授权的窗口。
后来我用了别人的手机来测,也不管用。
不知道为什么??
0 个回复