主题 : jeecmsv9的微信小程序未授权,微信登录不了 |
级别: 解元
|
3# 发表于:2018-05-09 23:30:26 IP:223.115.*.*
回复第2楼 找了这样的一个提示,可以通过这个去再次打开。 你的demo中没有对这样的做处理。
// 显示提示弹窗 wx.showModal({ title: '提示标题', content: '提示内容', success: function (res) { if (res.confirm) { console.log('用户点击确定') } else if (res.cancel) { console.log('用户点击cancel') wx.openSetting({ success: function (data) { if (data) { if (data.authSetting["scope.userInfo"] == true) { //loginStatus = true; wx.getUserInfo({ withCredentials: false, success: function (data) { console.info("3成功获取用户返回数据"); console.info(data.userInfo); }, fail: function () { console.info("3授权失败返回数据"); } }); } } }, fail: function () { console.info("设置失败返回数据"); } }); } } }); |
||
---|---|---|---|
1
共1页