# wx.openSetting(Object object)

Start from base library version 1.1.0. Please remaining backward compatible.

Opens the Mini Program settings interface on WeChat and returns setting results. Only the permissions that have been requested by the Mini Program from the user are displayed on the settings interface.

Note: As of the base library 2.3.0, only when the user taps at a specific location can the user be navigated to the settings page to manage authorization information. Details.

# Parameters

# Object object

Attribute Type Default Required Description
success function No The callback function for a successful API call
fail function No Callback function for failed API call
complete function No Callback function used when API call completed (always executed whether call succeeds or fails)

# object.success callback function

# Parameters
# Object res
Property Type Description
authSetting AuthSetting Results of user authorization

# Sample Code

wx.openSetting({
  success (res) {
    console.log(res.authSetting)
    // res.authSetting = {
    // "scope.userInfo": true,
    // "scope.userLocation": true
    // }
  }
})
点击咨询小助手