| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748 |
- using EasyTemplate.Tool;
- using Microsoft.JSInterop;
- namespace EasyTemplate.Blazor.Web.Components.Pages.Account.Setting;
- public partial class Setting
- {
- private void SelectKey(MenuItem item)
- {
- TSelectKey = item.Key;
- }
- protected override async Task OnInitializedAsync()
- {
- await base.OnInitializedAsync();
- }
- protected override async Task OnAfterRenderAsync(bool firstRender)
- {
- if (firstRender)
- {
- await NavigationManager.RedirectLogin(IJSRuntime);
- Global.CurrentUser = User.GetFirst(x => x.Id == Global.CurrentUser.Id);
- }
- }
- private readonly Dictionary<string, string> _menuMap = new Dictionary<string, string>
- {
- {"base", "基本设置"},
- //{"security", "安全设置"},
- {"binding", "账号绑定"},
- //{"notification", "消息提示"},
- };
- private string TSelectKey = "base";
- /// <summary>
- ///
- /// </summary>
- [Inject] private SqlSugarRepository<SystemUser> User { get; set; }
- /// <summary>
- ///
- /// </summary>
- [Inject] NavigationManager NavigationManager { get; set; }
- /// <summary>
- ///
- /// </summary>
- [Inject] IJSRuntime IJSRuntime { get; set; }
- }
|