2025-07-08 23:06:19 +08:00
|
|
|
@page
|
|
|
|
@model LoginModel
|
|
|
|
|
|
|
|
@{
|
|
|
|
ViewData["Title"] = "登录";
|
|
|
|
}
|
|
|
|
|
2025-07-09 15:40:47 +08:00
|
|
|
<h1 class="text-center">@ViewData["Title"]</h1>
|
|
|
|
<div class="container">
|
|
|
|
<div class="row justify-content-center">
|
|
|
|
<div class="col-md-6">
|
|
|
|
<section>
|
|
|
|
<form id="account" method="post" class="card p-4">
|
|
|
|
<h2 class="text-center">使用本地账户登录。</h2>
|
|
|
|
<hr />
|
|
|
|
<div asp-validation-summary="ModelOnly" class="text-danger" role="alert"></div>
|
|
|
|
<div class="form-outline mb-4">
|
|
|
|
<input asp-for="Input.Email" type="email" id="email" class="form-control" autocomplete="username" aria-required="true" placeholder="name@example.com" />
|
|
|
|
<label asp-for="Input.Email" class="form-label">电子邮件</label>
|
|
|
|
<span asp-validation-for="Input.Email" class="text-danger"></span>
|
|
|
|
</div>
|
|
|
|
<div class="form-outline mb-4">
|
|
|
|
<input asp-for="Input.Password" type="password" id="password" class="form-control" autocomplete="current-password" aria-required="true" placeholder="password" />
|
|
|
|
<label asp-for="Input.Password" class="form-label">密码</label>
|
|
|
|
<span asp-validation-for="Input.Password" class="text-danger"></span>
|
|
|
|
</div>
|
|
|
|
<div class="form-check mb-4">
|
2025-07-08 23:06:19 +08:00
|
|
|
<input class="form-check-input" asp-for="Input.RememberMe" />
|
2025-07-09 15:40:47 +08:00
|
|
|
<label class="form-check-label" asp-for="Input.RememberMe">记住我</label>
|
|
|
|
</div>
|
|
|
|
<div class="d-grid gap-2">
|
|
|
|
<button id="login-submit" type="submit" class="btn btn-primary btn-block">登录</button>
|
|
|
|
</div>
|
|
|
|
<div class="text-center mt-3">
|
|
|
|
<p>
|
|
|
|
<a id="forgot-password" asp-page="./ForgotPassword">忘记密码?</a>
|
|
|
|
</p>
|
|
|
|
<p>
|
|
|
|
<a asp-page="./Register" asp-route-returnUrl="@Model.ReturnUrl">注册为新用户</a>
|
|
|
|
</p>
|
|
|
|
<p>
|
|
|
|
<a id="resend-confirmation" asp-page="./ResendEmailConfirmation">重新发送电子邮件确认</a>
|
|
|
|
</p>
|
|
|
|
</div>
|
|
|
|
</form>
|
|
|
|
</section>
|
|
|
|
</div>
|
2025-07-08 23:06:19 +08:00
|
|
|
</div>
|
2025-07-09 15:40:47 +08:00
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="row justify-content-end">
|
|
|
|
<div class="col-md-6">
|
2025-07-08 23:06:19 +08:00
|
|
|
<section>
|
2025-07-09 15:40:47 +08:00
|
|
|
<h3 class="text-center">使用其他服务登录。</h3>
|
2025-07-08 23:06:19 +08:00
|
|
|
<hr />
|
2025-07-09 15:40:47 +08:00
|
|
|
@if ((Model.ExternalLogins?.Count ?? 0) == 0)
|
|
|
|
{
|
|
|
|
<div>
|
|
|
|
<p class="text-center">
|
|
|
|
没有配置外部身份验证服务。请参阅<a href="https://go.microsoft.com/fwlink/?LinkID=532715">关于设置此ASP.NET应用程序以支持通过外部服务登录的文章</a>。
|
|
|
|
</p>
|
|
|
|
</div>
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
<form id="external-account" asp-page="./ExternalLogin" asp-route-returnUrl="@Model.ReturnUrl" method="post" class="card p-4">
|
|
|
|
<div class="d-grid gap-2">
|
|
|
|
@foreach (var provider in Model.ExternalLogins!)
|
|
|
|
{
|
|
|
|
<button type="submit" class="btn btn-primary" name="provider" value="@provider.Name" title="使用您的 @provider.DisplayName 账户登录">@provider.DisplayName</button>
|
|
|
|
}
|
2025-07-08 23:06:19 +08:00
|
|
|
</div>
|
2025-07-09 15:40:47 +08:00
|
|
|
</form>
|
2025-07-08 23:06:19 +08:00
|
|
|
}
|
|
|
|
</section>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
@section Scripts {
|
|
|
|
<partial name="_ValidationScriptsPartial" />
|
2025-07-09 15:40:47 +08:00
|
|
|
}
|