Part.01
Part.02
Part.03@page"/login"
@layoutRecordWorkSaaS.Components.Layout.AuthLayout
@rendermodeInteractiveServer
@injectNavigationManagerNavigation
@injectGlobalStateGlobalState
@injectISnackbarSnackbar
@injectISmsServiceSmsService
@usingRecordWorkSaaS.DB.Businesses
@usingRecordWorkSaaS.Comn.Services<PageTitle>账号登录 - 白泽数字工厂</PageTitle>
<!-- MudBlazor全局服务提供者 -->
<MudThemeProvider Theme="@_lightTheme" IsDarkMode="false" />
<MudDialogProvider />
<MudSnackbarProvider />
<MudPopoverProvider />@if (_showSetPassword)
{
<!-- 设置密码视图 -->
}
else if (_showBindPhone)
{
<!-- 绑定手机号视图 -->
}
else
{
<!-- 登录主视图 -->
}@bind-Value="_phone"
@bind-Value="_smsCode"value="@_account"
@oninput="OnAccountInput"
@oninput="OnLoginPwdInput"type="@(_passwordVisible ? "text" : "password")"
@onclick="DoSetPassword"
@onclick="SendCode"
@onclick="DoLoginByAccount"
@onclick="TogglePasswordVisibility"
@onclick="SwitchToSmsLogin"@onclick="() => SelectPhonePrefix(prefix)"
@foreach (var prefix in _phonePrefixes)
{
<!-- 遍历下拉手机号区号 -->
}Disabled="_countdown > 0 || _isLoading"
@if (_isLoading) { 加载组件 }@(_countdown > 0 ? $"{_countdown}s" : "获取验证码")<!-- 输入框 -->
<MudTextField />
<!-- 按钮 -->
<MudButton OnClick="" Disabled="" FullWidth="" />
<!-- 环形加载 -->
<MudProgressCircular Indeterminate="true" />form onsubmit="return false;" <!-- 阻止表单默认提交 -->
autocomplete="off" <!-- 关闭自动填充 -->
autocomplete="new-password"
autocomplete="current-password"// 后台对应状态
bool _showSetPassword;
bool _showBindPhone;
string _loginMode;
bool _passwordVisible;
int _countdown;
bool _isLoading;
Part.04