diff --git a/Bootstrap.Admin/Scripts/common-scripts.js b/Bootstrap.Admin/Scripts/common-scripts.js index 0e7bfaa2..73dc4c1c 100644 --- a/Bootstrap.Admin/Scripts/common-scripts.js +++ b/Bootstrap.Admin/Scripts/common-scripts.js @@ -192,6 +192,10 @@ $(function () { toastr.error(data[1], "应用程序出现错误"); $.reloadWidget(); break; + case "Users": + toastr.info(data[1], "新用户注册"); + $.reloadWidget(); + break; } }; ws.onclose = function () { diff --git a/Bootstrap.DataAccess/UserHelper.cs b/Bootstrap.DataAccess/UserHelper.cs index faed5f4d..42a6fc19 100644 --- a/Bootstrap.DataAccess/UserHelper.cs +++ b/Bootstrap.DataAccess/UserHelper.cs @@ -145,6 +145,7 @@ namespace Bootstrap.DataAccess } CacheCleanUtility.ClearCache(userIds: p.Id == 0 ? string.Empty : p.Id.ToString()); ret = true; + if (p.UserStatus == 1) NotificationHelper.PushMessage(new MessageBody() { Category = "Users", Message = string.Format("{0}-{1}", p.UserName, p.Description) }); } catch (DbException ex) {