Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

重新发起授权。 #13

Open
kainy opened this issue Mar 23, 2017 · 1 comment
Open

重新发起授权。 #13

kainy opened this issue Mar 23, 2017 · 1 comment

Comments

@kainy
Copy link

kainy commented Mar 23, 2017

“会员机制是关联微信授权登录的,如果用户点击拒绝登录后,后边的流程无法继续走下去,当用户拒绝授权登陆后,如何重新发起授权呢?”
求教。

@jacksplwxy
Copy link

我是修改了login.js文件,拒绝后弹出重新授权模态框:
fail: function (userError) {
//用户拒绝授权后,打开设置,让用户进行授权
wx.showModal({
title: '登录失败!',
content: '请允许获取您的公开信息',
success: (res) => {
wx.openSetting({
success: (res) => {
if (res.authSetting['scope.userInfo']) {
wx.getUserInfo({
success: function (userResult) {
callback(null, {
code: loginResult.code,
encryptedData: userResult.encryptedData,
iv: userResult.iv,
userInfo: userResult.userInfo,
});
},
})
}
}
})
}
})
},

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants