修改BUG:后台管理站点更改个人头像后,前台站点无法获得新头像

This commit is contained in:
Argo-MacBookPro 2018-09-28 10:27:02 +08:00
parent 7480e821c3
commit b677927047
3 changed files with 4 additions and 3 deletions

View File

@ -1,5 +1,6 @@
using Bootstrap.Client.DataAccess;
using Bootstrap.Security;
using Longbow.Configuration;
using System.Security.Principal;
namespace Bootstrap.Client.Models
@ -13,10 +14,10 @@ namespace Bootstrap.Client.Models
///
/// </summary>
/// <param name="identity"></param>
public HeaderBarModel(IIdentity identity)
public HeaderBarModel(IIdentity identity)
{
var user = BootstrapUser.RetrieveUserByUserName(identity.Name);
Icon = user.Icon;
Icon = $"{ConfigurationManager.AppSettings["AuthHost"]}/{user.Icon.TrimStart('~', '/')}";
DisplayName = user.DisplayName;
UserName = user.UserName;
SettingsUrl = DictHelper.RetrieveSettingsUrl();

View File

@ -11,7 +11,7 @@
</div>
<div class="dropdown userinfo">
<a data-toggle="dropdown" class="dropdown-toggle shadow-default" href="#">
<img id="headerIcon" alt="" src="@Url.Content(Model.Icon)" asp-append-version="true">
<img id="headerIcon" alt="" src="@Model.Icon" asp-append-version="true">
<span id="userDisplayName" data-userName="@Model.UserName" class="username text-truncate d-inline-block">@Model.DisplayName</span>
</a>
<div class="dropdown-menu dropdown-menu-right">

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.0 KiB