getUserInfo weex 获取当前用户信息

getUserInfo

weex 获取当前用户信息

#请求参数

  • N/A

#接口调用示例

this.$bridge
  .getUserInfo()
  .then(res => {
    this.$toast(res)
  })
  .catch(err => {
     this.$toast(err)
  })

#返回参数

Prop Type Default Description
userId String N/A 用户ID(接口异常或异步处理中时,userId可能为空,使用时需要判空)
nickName String N/A 用户昵称
avatar String N/A 用户头像
mobile String N/A 用户手机号
email String N/A 用户邮箱
homeId String N/A 用户家庭ID
uid String N/A 用户uid(接口异常或异步处理中时,uid可能为空,使用时需要判空)

#返回示例

{
    "userId": "6876372685",
    "nickName": "张三",
    "avatar": "https://fcmms.midea.com/ccrm-sit/userHedImg/defaultHeadImg.png",
    "mobile": "13380360008",
    "email": "xxx@163.com",
    "homeId": "1146279",
    "uid": "12f4d8aab3b44132a57c2744cd99dfc8",
}
posted on 2024-12-18 09:20  AtlasLapetos  阅读(20)  评论(0)    收藏  举报