跳到主要内容

bn.getUserProfile

getUserProfile(): Promise<UserProfileResponse>

description Get user information. The page generates a click event(such as button). Each request will pop up an authorization window after the user agrees to return userInfo

example

bn.getUserProfile({
desc: 'Used to improve member information',
success: (res) => {
this.setData({
userInfo: res.userInfo,
hasUserInfo: true
})
}
})

Returns

Promise<UserProfileResponse>

UserProfileResponse

UserProfileResponse

Ƭ UserProfileResponse: Object

Type declaration

NameType
userInfoUserInfo

UserInfo

Ƭ UserInfo: Object

Type declaration

NameTypeDescription
nickNamestringUser's Nickname
avatarUrlstringThe URL of the user's avatar picture.