这个报错是什么意思,要做什么?
![](https://image.wxopen.club/content_8cacb554-31d1-11ea-873c-38c9863fc7a9.png)
对应的代码如下:
getUserInfo: function (cb) {
var that = this
if (this.globalData.userInfo) {
typeof cb == “function” && cb(this.globalData.userInfo)
} else {
//调用登录接口
wx.login({
success: function () {
wx.getUserInfo({
success: function (res) {
that.globalData.userInfo = res.userInfo
typeof cb == “function” && cb(that.globalData.userInfo)
}
})
}
})
}