# wx.getPhoneMask(Object object)

iOS >= 0.7.13 Support, Android >= 0.7.5 Support.

Get the local phone number mask and display it on the login page. Act asLocal Number One Click LoginThe preceding steps. (Note that the native number one-click login will consume wx.getPhoneMask Obtained context information such that the context information is invalidated. If the developer needs to call the native number again for one-click login, it should be called again wx.getPhoneMask。 )

# Pre-process flow

The phone turns on the cellular network.

# 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
phoneMask string Phone number mask: 137****1234

# object.fail callback

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

**res.errCode **

errCode Introductions
-700000 Front End Error, errMsg Will give detailed hints

# sample code

wx.getPhoneMask({
  success (res) {
    if (res.phoneMask ) {
      // Get Phone Number Mask res.phoneMask  Success, displayed on the login page.
    }
  }
})