diff --git a/Infrastructure/GlobalConstant.cs b/Infrastructure/GlobalConstant.cs
index db66974..25fc8d0 100644
--- a/Infrastructure/GlobalConstant.cs
+++ b/Infrastructure/GlobalConstant.cs
@@ -25,5 +25,33 @@ namespace Infrastructure
/// 用户权限缓存key
///
public static string UserPermKEY = "CACHE-USER-PERM";
+
+ ///
+ /// 欢迎语
+ ///
+ public static string[] WelcomeMessages = new string[] {
+ "祝你开心每一天!",
+ "忙碌了一周,停一停脚步!",
+ "世间美好,与你环环相扣!",
+ "永远相信美好的事情即将发生!",
+ "每一天,遇见更好的自己!",
+ "保持热爱,奔赴山海!",
+ "生活明朗,万物可爱!",
+ "愿每一天醒来都是美好的开始!",
+ "没有希望的地方,就没有奋斗!",
+ "我最珍贵的时光都行走在路上!",
+ "成功,往往住在失败的隔壁!",
+ "人只要不失去方向,就不会失去自己!",
+ "每条堵住的路,都有一个出口!",
+ "没有谁能击垮你,除非你自甘堕落!",
+ "微笑着的人并非没有痛苦!",
+ "生活变的再糟糕,也不妨碍我变得更好!",
+ "你要悄悄努力,然后惊艳众人!",
+ "人与人之间最大的信任是精诚相见",
+ "人生就像爬坡,要一步一步来。",
+ "今天的目标完成了吗?",
+ "高效工作,告别996",
+ "销售是从别人拒绝开始的!"
+ };
}
}
diff --git a/ZR.Admin.WebApi/Controllers/System/SysLoginController.cs b/ZR.Admin.WebApi/Controllers/System/SysLoginController.cs
index ec5b2aa..72f72ce 100644
--- a/ZR.Admin.WebApi/Controllers/System/SysLoginController.cs
+++ b/ZR.Admin.WebApi/Controllers/System/SysLoginController.cs
@@ -125,7 +125,7 @@ namespace ZR.Admin.WebApi.Controllers.System
List roles = permissionService.GetRolePermission(user);
//权限集合 eg *:*:*,system:user:list
List permissions = permissionService.GetMenuPermission(user);
-
+ user.WelcomeContent = GlobalConstant.WelcomeMessages[new Random().Next(0, GlobalConstant.WelcomeMessages.Length)];
return SUCCESS(new { user, roles, permissions });
}
diff --git a/ZR.Model/System/SysUser.cs b/ZR.Model/System/SysUser.cs
index 3adb5d7..749a8dd 100644
--- a/ZR.Model/System/SysUser.cs
+++ b/ZR.Model/System/SysUser.cs
@@ -21,9 +21,7 @@ namespace ZR.Model.System
public long UserId { get; set; }
//[Duplication]//校验模板类该列数据是否重复
public string UserName { get; set; }
-
public string NickName { get; set; }
-
///
/// '用户类型(00系统用户)',
///
@@ -32,16 +30,15 @@ namespace ZR.Model.System
[SugarColumn(IsOnlyIgnoreInsert = true)]
[EpplusIgnore]
public string Avatar { get; set; }
-
public string Email { get; set; }
[JsonIgnore]
[EpplusIgnore]
public string Password { get; set; }
-
- //[ColName("手机号")]
+ ///
+ /// 手机号
+ ///
public string Phonenumber { get; set; }
-
///
/// 用户性别(0男 1女 2未知)
///
@@ -76,7 +73,7 @@ namespace ZR.Model.System
/// 部门Id
///
public long DeptId { get; set; }
-
+
#region 表额外字段
public bool IsAdmin()
{
@@ -110,6 +107,37 @@ namespace ZR.Model.System
[SugarColumn(IsIgnore = true)]
[EpplusIgnore]
public List Roles { get; set; }
+ [SugarColumn(IsIgnore = true)]
+ public string WelcomeMessage
+ {
+ get
+ {
+ int now = DateTime.Now.Hour;
+
+ if (now > 0 && now <= 6)
+ {
+ return "午夜好";
+ }
+ else if (now > 6 && now <= 11)
+ {
+ return "早上好";
+ }
+ else if (now > 11 && now <= 14)
+ {
+ return "中午好";
+ }
+ else if (now > 14 && now <= 18)
+ {
+ return "下午好";
+ }
+ else
+ {
+ return "晚上好";
+ }
+ }
+ }
+ [SugarColumn(IsIgnore = true)]
+ public string WelcomeContent { get; set; }
#endregion
}
diff --git a/ZR.Vue/src/layout/components/Navbar.vue b/ZR.Vue/src/layout/components/Navbar.vue
index ce990fb..45cc275 100644
--- a/ZR.Vue/src/layout/components/Navbar.vue
+++ b/ZR.Vue/src/layout/components/Navbar.vue
@@ -15,16 +15,16 @@
-
+
-
+