Browse Source

【增加】30天未修改密码弹框提示;

西昌缴费二期
dyy 2 years ago
parent
commit
cbf0f1151e
5 changed files with 30 additions and 0 deletions
  1. +5
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Organization/User/UserEntity.cs
  2. +1
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Organization/User/UserService.cs
  3. +17
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Controllers/LoginController.cs
  4. +5
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Views/Home/AdminDefault/index.js
  5. +2
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Views/Login/Default/Index.js

+ 5
- 0
Learun.Framework.Ultimate V7/Learun.Application.Organization/User/UserEntity.cs View File

@@ -235,6 +235,11 @@ namespace Learun.Application.Organization


[Column("F_ORDER")] [Column("F_ORDER")]
public int? F_Order { get; set; } public int? F_Order { get; set; }
/// <summary>
/// 修改密码日期
/// </summary>
[Column("F_MODIFYPWDDATE")]
public DateTime? F_ModifyPwdDate { get; set; }
#endregion #endregion


#region 扩展操作 #region 扩展操作


+ 1
- 0
Learun.Framework.Ultimate V7/Learun.Application.Organization/User/UserService.cs View File

@@ -515,6 +515,7 @@ namespace Learun.Application.Organization
userEntity.Modify(keyValue); userEntity.Modify(keyValue);
userEntity.F_Secretkey = Md5Helper.Encrypt(CommonHelper.CreateNo(), 16).ToLower(); userEntity.F_Secretkey = Md5Helper.Encrypt(CommonHelper.CreateNo(), 16).ToLower();
userEntity.F_Password = Md5Helper.Encrypt(DESEncrypt.Encrypt(password, userEntity.F_Secretkey).ToLower(), 32).ToLower(); userEntity.F_Password = Md5Helper.Encrypt(DESEncrypt.Encrypt(password, userEntity.F_Secretkey).ToLower(), 32).ToLower();
userEntity.F_ModifyPwdDate = DateTime.Now;
this.BaseRepository().Update(userEntity); this.BaseRepository().Update(userEntity);
} }
catch (Exception ex) catch (Exception ex)


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

@@ -570,6 +570,23 @@ namespace Learun.Application.Web.Controllers
{ {
return Success(new { pwd = true }); return Success(new { pwd = true });
} }
//是否30天未修改密码验证
//TODO:获取开关配置中“30天未修改密码进行提示”项的配置
if (userEntity.F_ModifyPwdDate.HasValue)
{
if ((DateTime.Now-userEntity.F_ModifyPwdDate.Value).Days>30)
{
return Success(new { pwdtip = true });
}
}
else
{
if (userEntity.F_CreateDate.HasValue && (DateTime.Now-userEntity.F_CreateDate.Value).Days>30)
{
return Success(new { pwdtip=true });
}
}

return Success("登录成功"); return Success("登录成功");
} }
#endregion #endregion


+ 5
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Views/Home/AdminDefault/index.js View File

@@ -7,6 +7,7 @@
*/ */
var autoopenid = request('autoopen'); var autoopenid = request('autoopen');
var pwd = request("pwd"); var pwd = request("pwd");
var pwdtip = request("pwdtip");
var bootstrap = function ($, learun) { var bootstrap = function ($, learun) {
"use strict"; "use strict";
// 菜单操作 // 菜单操作
@@ -225,6 +226,10 @@ var bootstrap = function ($, learun) {
} }
}); });
} }
//30天未修改密码进行提示
if (pwdtip == "true") {
layer.alert("您已30天未修改密码,请先修改!", { title: "提示", yes: function (index) { layer.close(index) } });
}
//上网认证 //上网认证
if (ACIp != null && ACIp != "") { if (ACIp != null && ACIp != "") {
//Ip上网 //Ip上网


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

@@ -164,6 +164,8 @@
} else { } else {
if (res.data.pwd == true) { if (res.data.pwd == true) {
window.location.href = "/Home/Index?pwd=true"; window.location.href = "/Home/Index?pwd=true";
} else if (res.data.pwdtip == true) {
window.location.href = "/Home/Index?pwdtip=true";
} }
else else
window.location.href = "/Home/Index"; window.location.href = "/Home/Index";


Loading…
Cancel
Save