收藏
回答

这个报错是什么意思,要做什么?



对应的代码如下:


  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)

            }

          })

        }

      })

    }


回答关注问题邀请回答
收藏
登录 后发表内容