/// <summary> /// 注销时清空用户信息 /// </summary> public static void ResetUser() { UserID = -1; UserName = null; UserPhone = null; UserPhoto = null; BaseRpc.RefreshHeader(); }
/// <summary> /// 登录后初始化用户信息 /// </summary> /// <param name="p_result"></param> public static void InitUser(LoginResult p_result) { UserID = p_result.UserID; UserPhone = p_result.Phone; UserName = p_result.Name; UserPhoto = p_result.Photo; BaseRpc.RefreshHeader(); if (p_result.Contains("Version")) { UpdateDataVersion(p_result.Version); } LoginSuc?.Invoke(); }