授权后跳转res.authSetting['scope.userInfo']为空

发布于 7 年前作者 min101402 次浏览最后编辑 7 年前来自 ask

授权成功后跳转首页,res.authSetting[‘scope.userInfo’]为空,仍然提示再次授权,是开发者工具问题?还是我写错了

success: function (res) {

var utoken = res.data.data.utoken;

//设置用户缓存

wx.setStorageSync(‘utoken’, utoken);

wx.switchTab({

url: ‘/pages/index/index’

})

}

1 回复
yuanna
yuanna1 楼6 年前

你好,请具体描述问题出现的流程,并提供能复现问题的简单代码片段(https://developers.weixin.qq.com/miniprogram/dev/devtools/minicode.html)。