Browse Source

登录页面正常显示验证码

新疆影视学院高职
liangkun 2 years ago
parent
commit
0b3c8c5c9e
2 changed files with 7 additions and 7 deletions
  1. +4
    -4
      Learun.Framework.Ultimate V7/Learun.Application.Web/Controllers/LoginController.cs
  2. +3
    -3
      Learun.Framework.Ultimate V7/Learun.Application.Web/Views/Login/Default/Index.js

+ 4
- 4
Learun.Framework.Ultimate V7/Learun.Application.Web/Controllers/LoginController.cs View File

@@ -506,9 +506,9 @@ namespace Learun.Application.Web.Controllers
public ActionResult CheckLogin(string username, string password, string verifycode, string up) public ActionResult CheckLogin(string username, string password, string verifycode, string up)
{ {


int error = OperatorHelper.Instance.GetCurrentErrorNum();
if (error >= 3)
{
//int error = OperatorHelper.Instance.GetCurrentErrorNum();
//if (error >= 3)
//{
#region 验证码验证 #region 验证码验证
verifycode = Md5Helper.Encrypt(verifycode.ToLower(), 16); verifycode = Md5Helper.Encrypt(verifycode.ToLower(), 16);
if (Session["session_verifycode"].IsEmpty() || verifycode != Session["session_verifycode"].ToString()) if (Session["session_verifycode"].IsEmpty() || verifycode != Session["session_verifycode"].ToString())
@@ -516,7 +516,7 @@ namespace Learun.Application.Web.Controllers
return Fail("验证码错误"); return Fail("验证码错误");
} }
#endregion #endregion
}
//}


#region 内部账户验证 #region 内部账户验证
UserEntity userEntity = userBll.CheckLogin(username, password); UserEntity userEntity = userBll.CheckLogin(username, password);


+ 3
- 3
Learun.Framework.Ultimate V7/Learun.Application.Web/Views/Login/Default/Index.js View File

@@ -69,12 +69,12 @@
$("#lr_verifycode_input").val(''); $("#lr_verifycode_input").val('');
$("#lr_verifycode_img").attr("src", $.rootUrl + "/Login/VerifyCode?time=" + Math.random()); $("#lr_verifycode_img").attr("src", $.rootUrl + "/Login/VerifyCode?time=" + Math.random());
}); });
var errornum = $('#errornum').val();
if (errornum >= 3) {
//var errornum = $('#errornum').val();
//if (errornum >= 3) {


$('.lr-login-bypsw').removeClass('noreg'); $('.lr-login-bypsw').removeClass('noreg');
$("#lr_verifycode_img").trigger('click'); $("#lr_verifycode_img").trigger('click');
}
//}


//点击密码icon 显示/隐藏 //点击密码icon 显示/隐藏
$('#psw_change').click(function (event) { $('#psw_change').click(function (event) {


Loading…
Cancel
Save