feat(#IW65C): 个人信息系统通知地址可配置

#Comment
字典表新增测试平台配置项 系统通知地址
comment #IW65C

#Issue
close https://gitee.com/LongbowEnterprise/dashboard/issues?id=IW65C
This commit is contained in:
Argo Zhang 2019-05-05 16:14:14 +08:00
parent 0764437f3f
commit 5803cd8c1e
10 changed files with 33 additions and 1 deletions

Binary file not shown.

View File

@ -36,6 +36,15 @@ namespace Bootstrap.Client.DataAccess
return RetrieveAppName("系统设置地址");
}
/// <summary>
///
/// </summary>
/// <returns></returns>
public static string RetrieveNotisUrl()
{
return RetrieveAppName("系统通知地址");
}
/// <summary>
///
/// </summary>

View File

@ -23,34 +23,46 @@ namespace Bootstrap.Client.Models
UserName = user.UserName;
SettingsUrl = DictHelper.RetrieveSettingsUrl();
ProfilesUrl = DictHelper.RetrieveProfilesUrl();
NotisUrl = DictHelper.RetrieveNotisUrl();
var uriBuilder = new UriBuilder(ConfigurationManager.AppSettings["AuthHost"]);
uriBuilder.Path = uriBuilder.Path == "/" ? CookieAuthenticationDefaults.LogoutPath.Value : uriBuilder.Path + CookieAuthenticationDefaults.LogoutPath;
LogoutUrl = uriBuilder.ToString();
if (!string.IsNullOrEmpty(user.Css)) Theme = user.Css;
}
/// <summary>
///
/// </summary>
public string UserName { get; }
/// <summary>
///
/// </summary>
public string DisplayName { get; }
/// <summary>
/// 获得/设置 用户头像地址
/// </summary>
public string Icon { get; }
/// <summary>
/// 获得/设置 设置网址
/// </summary>
public string SettingsUrl { get; }
/// <summary>
/// 获得/设置 个人中心网址
/// </summary>
public string ProfilesUrl { get; }
/// <summary>
/// 获得 退出登录地址
/// </summary>
public string LogoutUrl { get; }
/// <summary>
///
/// </summary>
public string NotisUrl { get; }
}
}

View File

@ -31,7 +31,7 @@
<div class="dropdown-item">
<a href="@Model.ProfilesUrl"><i class=" fa fa-suitcase"></i>个人中心</a>
<a href="@Model.SettingsUrl"><i class="fa fa-cog"></i>设置</a>
<a href="#"><i class="fa fa-bell"></i>通知<span id="logoutNoti" class="badge badge-pill badge-success"></span></a>
<a href="@Model.NotisUrl"><i class="fa fa-bell"></i>通知<span id="logoutNoti" class="badge badge-pill badge-success"></span></a>
</div>
<div class="dropdown-item">
<a href="@Model.LogoutUrl"><i class="fa fa-key"></i>注销</a>

View File

@ -144,6 +144,7 @@ Insert Dicts (Category, Name, Code, Define) values (@AppName, N'网站标题', N
Insert Dicts (Category, Name, Code, Define) values (@AppName, N'网站页脚', N'通用后台管理测试平台', 1);
Insert Dicts (Category, Name, Code, Define) values (@AppName, N'个人中心地址', N'http://localhost:50852/Admin/Profiles', 1);
Insert Dicts (Category, Name, Code, Define) values (@AppName, N'系统设置地址', N'http://localhost:50852/Admin/Index', 1);
Insert Dicts (Category, Name, Code, Define) values (@AppName, N'系统通知地址', N'http://localhost:50852/Admin/Notifications', 1);
-- 菜单
DELETE FROM Navigations Where [Application] = @AppId

View File

@ -258,6 +258,13 @@
"Code": "http://localhost:50852/Admin/Index",
"Define": NumberInt(1)
},
{
"_id": ObjectId("5bd6c73d5fa31256f77e4a12"),
"Category": "测试平台",
"Name": "系统通知地址",
"Code": "http://localhost:50852/Admin/Notifications",
"Define": NumberInt(1)
},
{
"_id": ObjectId("5bd6c73d5fa31256f77e4a37"),
"Category": "设备驱动",

View File

@ -134,6 +134,7 @@ Insert into Dicts (Category, Name, Code, Define) values ('测试平台', '网站
Insert into Dicts (Category, Name, Code, Define) values ('测试平台', '网站页脚', '通用后台管理测试平台', 1);
Insert into Dicts (Category, Name, Code, Define) values ('测试平台', '个人中心地址', 'http://localhost:50852/Admin/Profiles', 1);
Insert into Dicts (Category, Name, Code, Define) values ('测试平台', '系统设置地址', 'http://localhost:50852/Admin/Index', 1);
Insert into Dicts (Category, Name, Code, Define) values ('测试平台', '系统通知地址', 'http://localhost:50852/Admin/Notifications', 1);
Delete from Navigations where Application = 2;
INSERT into Navigations (ParentId, Name, `Order`, Icon, Url, Category, Application) VALUES (0, '首页', 10, 'fa fa-fa', '~/Home/Index', '1', 2);

View File

@ -134,6 +134,7 @@ Insert into Dicts (Category, Name, Code, Define) values ('测试平台', '网站
Insert into Dicts (Category, Name, Code, Define) values ('测试平台', '网站页脚', '通用后台管理测试平台', 1);
Insert into Dicts (Category, Name, Code, Define) values ('测试平台', '个人中心地址', 'http://localhost:50852/Admin/Profiles', 1);
Insert into Dicts (Category, Name, Code, Define) values ('测试平台', '系统设置地址', 'http://localhost:50852/Admin/Index', 1);
Insert into Dicts (Category, Name, Code, Define) values ('测试平台', '系统通知地址', 'http://localhost:50852/Admin/Notifications', 1);
Delete from Navigations where Application = '2';
INSERT into Navigations (ParentId, Name, "order", Icon, Url, Category, Application) VALUES (0, '首页', 10, 'fa fa-fa', '~/Home/Index', '1', 2);

View File

@ -135,6 +135,7 @@ Insert into Dicts (Category, [Name], Code, Define) values ('测试平台', '网
Insert into Dicts (Category, [Name], Code, Define) values ('测试平台', '网站页脚', '通用后台管理测试平台', 1);
Insert into Dicts (Category, [Name], Code, Define) values ('测试平台', '个人中心地址', 'http://localhost:50852/Admin/Profiles', 1);
Insert into Dicts (Category, [Name], Code, Define) values ('测试平台', '系统设置地址', 'http://localhost:50852/Admin/Index', 1);
Insert into Dicts (Category, [Name], Code, Define) values ('测试平台', '系统通知地址', 'http://localhost:50852/Admin/Notifications', 1);
Delete from [Navigations] where Application = 2;
INSERT into [Navigations] ([ParentId], [Name], [Order], [Icon], [Url], [Category], [Application]) VALUES (0, '首页', 10, 'fa fa-fa', '~/Home/Index', '1', 2);

Binary file not shown.