/// <summary> /// 拉取用户信息(需scope为 snsapi_userinfo) /// </summary> /// <param name="code"></param> /// <returns></returns> public static async Task <WebAuthUserInfo> GetAsync(string code) { var user = new WebAuthUserInfo(code); var response = await user.RequestAsModelAsync <WebAuthUserInfo>(); return(response); }
/// <summary> /// 拉取用户信息(需scope为 snsapi_userinfo) /// </summary> /// <param name="code"></param> /// <returns></returns> public static WebAuthUserInfo Get(string code) { var user = new WebAuthUserInfo(code); var response = user.RequestAsModel <WebAuthUserInfo>(); return(response); }