# Function: createUserInfoButton

createUserInfoButton(params: CreateUserInfoButtonParams): UserInfoButton

# 参数:

属性 类型
params CreateUserInfoButtonParams

CreateUserInfoButtonParams

属性 类型 描述
image? string 按钮的背景图片,仅当 type 为 image 时有效
lang? Language 描述用户信息的语言
style UserInfoButtonStyle 按钮的样式
text? string 按钮上的文本,仅当 type 为 text 时有效
type UserInfoButtonType 按钮的类型。
withCredentials boolean 是否带上登录态信息。 当 withCredentials 为 true 时,要求此前有调用过 wx.login 且登录态尚未过期,此时返回的数据会包含 encryptedData, iv 等敏感信息; 当 withCredentials 为 false 时,不要求有登录态,返回的数据不包含 encryptedData, iv 等敏感信息。

# 返回值:

UserInfoButton