# getUserInfo ^7.8

获取登录态信息

# 请求参数

N/A

# 接口调用示例

this.$bridge
  .getUserInfo()
  .then((res) => {
    this.$alert(res);
  })
  .catch((err) => {
    this.$toast(err);
  });
1
2
3
4
5
6
7
8

# 接口返回示例

{
  userId: "123456",
  nickName: "xxxxx",
  avatar: "xxxxx",
  mobile: "12345678",
  email: "xxx@xx.com",
  homeId: "xxxx",
  uid: "ac70d2636c0c4dd5b86bc97bbc8166c6",
  sex: "",
  signature: ""
}

// 未登录时返回
{
  code: -1,
  msg: '未登录'
}
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
更新时间: 8/5/2022, 5:24:56 PM