feat(#IVRNQ): 增加登录认证失败提示信息

#Issue
https://gitee.com/LongbowEnterprise/dashboard/issues?id=IVRNQ

#Comment
close #IVRNQ
This commit is contained in:
Argo Zhang 2019-04-23 18:46:01 +08:00
parent 2740fb7062
commit d4d536e9b6
5 changed files with 41 additions and 24 deletions

View File

@ -56,8 +56,8 @@ namespace Bootstrap.Admin.Controllers
// redirect origin url // redirect origin url
var originUrl = Request.Query[CookieAuthenticationDefaults.ReturnUrlParameter].FirstOrDefault() ?? "~/Home/Index"; var originUrl = Request.Query[CookieAuthenticationDefaults.ReturnUrlParameter].FirstOrDefault() ?? "~/Home/Index";
return Redirect(originUrl); return Redirect(originUrl);
} }
return View("Login", new LoginModel()); return View("Login", new LoginModel() { AuthFailed = true });
} }
/// <summary> /// <summary>

View File

@ -14,10 +14,15 @@ namespace Bootstrap.Admin.Models
{ {
ImageLibUrl = DictHelper.RetrieveImagesLibUrl(); ImageLibUrl = DictHelper.RetrieveImagesLibUrl();
} }
/// <summary> /// <summary>
/// 验证码图床地址 /// 验证码图床地址
/// </summary> /// </summary>
public string ImageLibUrl { get; protected set; } public string ImageLibUrl { get; protected set; }
/// <summary>
/// 是否登录认证失败
/// </summary>
public bool AuthFailed { get; set; }
} }
} }

View File

@ -46,6 +46,14 @@
<form id="login" method="post" class="form-signin"> <form id="login" method="post" class="form-signin">
<h2 class="form-signin-heading">@Model.Title</h2> <h2 class="form-signin-heading">@Model.Title</h2>
<div class="login-wrap" data-toggle="LgbValidate" data-valid-button="button[type='submit']"> <div class="login-wrap" data-toggle="LgbValidate" data-valid-button="button[type='submit']">
@if (Model.AuthFailed)
{
<div class="alert alert-danger">用户名或密码错误!</div>
}
else
{
<div class="alert alert-success">请输入用户名与密码</div>
}
<div class="form-group"> <div class="form-group">
<div class="input-group"> <div class="input-group">
<div class="input-group-prepend"> <div class="input-group-prepend">

View File

@ -31,17 +31,21 @@
.login-wrap { .login-wrap {
padding: 0; padding: 0;
margin: 36px 0 0 370px; margin: 12px 0 0 370px;
width: 280px; width: 280px;
} }
.slidercaptcha { .slidercaptcha {
top: -254px; top: -282px;
left: -15px; left: -15px;
} }
.slidercaptcha, .slidercaptcha.forgot { .slidercaptcha, .slidercaptcha.forgot {
width: 310px; width: 310px;
height: 280px; height: 280px;
}
.form-signin .form-group {
margin-bottom: 0.75rem;
} }
} }

View File

@ -14,7 +14,7 @@
.login-wrap { .login-wrap {
padding: 20px; padding: 20px;
height: 270px; height: 330px;
} }
.login-wrap .rememberPwd { .login-wrap .rememberPwd {
@ -87,16 +87,16 @@
color: #fff; color: #fff;
} }
.slidercaptcha.forgot { .slidercaptcha.forgot {
position: absolute; position: absolute;
left: auto; left: auto;
right: 14px; right: 14px;
bottom: 14px; bottom: 14px;
top: auto; top: auto;
margin: 0; margin: 0;
width: 274px; width: 274px;
} }
.slidercaptcha.reg { .slidercaptcha.reg {
bottom: 60px; bottom: 60px;
} }