/** 微信小游戏wx开发文档 */ declare module wx { /** 获取用户信息,withCredentials 为 true 时需要先调用wx.login接口。需要用户授权scope.userInfo。注意:此接口有调整,小程序与小游戏获取用户信息接口调整,请开发者注意升级。 @param withCredentials 是否带上登录态信息。当 withCredentials 为 true 时,要求此前有调用过 wx.login 且登录态尚未过期,此时返回的数据会包含 encryptedData, iv 等敏感信息;当 withCredentials 为 false 时,不要求有登录态,返回的数据不包含 encryptedData, iv 等敏感信息。 @param lang 显示用户信息的语言 @param success 接口调用成功的回调函数 @param fail 接口调用失败的回调函数 @param complete 接口调用结束的回调函数(调用成功、失败都会执行) */ export function getUserInfo(withCredentials: boolean, lang: string, success: Function, fail: Function, complete: Function): void; }