# gmu.getSensitiveInfo


Promise 风格 调用:支持

获取用户敏感数据。需授权成功后才能获取。

# 参数

# Object object

属性 类型 默认值 必填 说明
scope string 需要获取的用户敏感数据域名,详见 scope 列表
success function 接口调用成功的回调函数
fail function 接口调用失败的回调函数
complete function 接口调用结束的回调函数(调用成功、失败都会执行)

# object.scope

scope 域名名称可自定义,格式如 scope.phoneNumber。以下为保留字段,请勿定义同名域名。

scope 说明
scope.userInfo 用户信息
scope.userLocation 地理位置
scope.userLocationBackground 后台定位
scope.address 通讯地址
scope.invoiceTitle 发票抬头
scope.invoice 获取发票
scope.werun 微信运动步数
scope.record 录音功能
scope.writePhotosAlbum 保存到相册
scope.camera 摄像头

# object.success 回调函数

# 参数

# Object res
属性 类型 说明
data Object 关联的数据域名对应的数据

# 示例代码

gmu.getSensitiveInfo({
  scope: 'scope.phoneNumber',
  success: function(res) {
    console.log(res.data.scope);
    console.log(res.data.value);
  }
})