Merge branch 'dev'

This commit is contained in:
Argo Zhang 2019-04-23 21:59:43 +08:00
commit f77c2906d5
7 changed files with 43 additions and 25 deletions

Binary file not shown.

View File

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

View File

@ -19,5 +19,10 @@ namespace Bootstrap.Admin.Models
/// 验证码图床地址
/// </summary>
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">
<h2 class="form-signin-heading">@Model.Title</h2>
<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="input-group">
<div class="input-group-prepend">

View File

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

View File

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

View File

@ -96,7 +96,8 @@
width: $.capWidth(),
height: $.capHeight(),
localImages: function () {
return '../../lib/captcha/images/Pic' + Math.round(Math.random() * 4) + '.jpg';
var base = $('#pathBase').attr('href');
return base + 'lib/captcha/images/Pic' + Math.round(Math.random() * 4) + '.jpg';
},
setSrc: function () {
return $imgUrl.val() + 'Pic' + Math.round(Math.random() * 136) + '.jpg';