- 用户昵称
+ @(UserInfo != null ? UserInfo?.Name : "")
+
-
-
-
-
-
+
+
+
+
-
- 编辑个人资料
-
-
-
+
+ 编辑个人资料
+
+
+
-
+
- 设置
+ 设置
-
+
-
-
-
-
+
+
+
+
-
- 退出登录
-
-
-
-
+
+ 退出登录
+
+
+
+
+
-
diff --git a/src/CloudStorage.Layou/Pages/PersonalCenter.razor.cs b/src/CloudStorage.Layou/Pages/PersonalCenter.razor.cs
index 76b561051c65429ef3241508ce0e389f25556672..0dfb2c6e6ea77779b057dc85d338b6ff80f4e301 100644
--- a/src/CloudStorage.Layou/Pages/PersonalCenter.razor.cs
+++ b/src/CloudStorage.Layou/Pages/PersonalCenter.razor.cs
@@ -1,14 +1,32 @@
-using Microsoft.AspNetCore.Components.Web;
+using CloudStoage.Domain.HttpModule.Result;
+using CloudStorage.Applications.Helpers;
namespace CloudStorage.Layou.Pages;
partial class PersonalCenter
{
+ private UserInfoDto? UserInfo { get; set; } =new UserInfoDto();
[Inject]
public NavigationManager? Navigation { get; set; }
+ [Inject]
+ public CommonHelper CommonHelper { get; set; }
+
+ [Inject]
+ public UserInfoApi UserInfoApi { get; set; }
+
private void OnLogoutClick(MouseEventArgs args)
{
Navigation?.NavigateTo("/login");
}
+
+ protected override async Task OnInitializedAsync()
+ {
+ await GetUserInfoAsync();
+ }
+
+ private async Task GetUserInfoAsync()
+ {
+ UserInfo = await UserInfoApi.GetAsync();
+ }
}
diff --git a/src/CloudStorage.Layou/Pages/Storages.razor.cs b/src/CloudStorage.Layou/Pages/Storages.razor.cs
index 752a786054b9988f92c89d8191c44d51e945fb72..a801c9dcf0ae8c9eb180ef8ba763c2a2e9ee3c3d 100644
--- a/src/CloudStorage.Layou/Pages/Storages.razor.cs
+++ b/src/CloudStorage.Layou/Pages/Storages.razor.cs
@@ -1,10 +1,14 @@
+using CloudStoage.Domain.Etos;
using CloudStoage.Domain.HttpModule.Input;
using CloudStoage.Domain.HttpModule.Result;
-using CloudStorage.Layou.Components;
+using CloudStorage.Applications.Helpers;
using CloudStorage.Layou.Helper;
+using Masa.Blazor;
using Microsoft.AspNetCore.Components.Forms;
-using Microsoft.JSInterop;
+using System.Diagnostics;
+using System.Net.Http.Handlers;
using Token.EventBus;
+using Token.EventBus.EventBus;
namespace CloudStorage.Layou.Pages;
@@ -27,7 +31,13 @@ partial class Storages
public PagedResultDto