# wx.miniapp.checkBindInfo(Object object)

The calling interface checks the current user account binding information while the system login state is in effect.

# Front preparation

call wx.xxxLogin Logged in successfully.

# parameter

# Object object

attribute type Default value Required Introductions
success function no Interface calls a successful callback function
fail function no Interface to call a failed callback function
complete function no The callback function at the end of an interface call

# object.success callback

# parameter
# Object res
attribute type Introductions
hasBoundPhone bool Whether the current user has a mobile phone number.
hasBoundWeixin bool Whether the current user is already bound to WeChat.
hasBoundApple bool Whether the current user is already bound to an Apple account.

# object.fail callback

# parameter
# Object res
attribute type Introductions
errCode number Error code
errMsg string Error message

**res.errCode **

errCode Introductions
-1 system error

# sample code

wx.miniapp.checkBindInfo({
  success(res) {
    if(res.hasBoundPhone ) {
      // Mobile phone number is bound
    } else {
      // There's no binding number. Developers can, depending on business needs, call wx.miniapp.bindPhone  Bind the phone number.
    }

    if(res.hasBoundWeixin ) {
      // Already bound WeChat
    } else {
      // No WeChat binding. Developers can, depending on business needs, call wx.miniapp.bindWeixin  Bound WeChat.
    }

    if(res.hasBoundApple ) {
      // The Apple account is tied.
    } else {
      // There is no Apple account. Developers can, depending on business needs, call wx.miniapp.bindApple  Bind the Apple account.
    }
  }
})