修改BUG:用户管理页面增加新用户后,右上角用户信息被改写

This commit is contained in:
Argo-Lenovo 2017-04-06 12:07:17 +08:00
parent dddb07d623
commit 6525a8f588
2 changed files with 2 additions and 2 deletions

View File

@ -75,7 +75,7 @@
}] }]
}, },
callback: function (data) { callback: function (data) {
if (data && data.success && data.oper === 'save') { if (data && data.success && data.oper === 'save' && data.UserName == $('#userDisplayName').attr('data-userName')) {
$('#userDisplayName').text(data.data.DisplayName); $('#userDisplayName').text(data.data.DisplayName);
} }
if (data && data.oper === 'create') { if (data && data.oper === 'create') {

View File

@ -97,7 +97,7 @@
<div class="dropdown"> <div class="dropdown">
<a data-toggle="dropdown" class="dropdown-toggle" href="#"> <a data-toggle="dropdown" class="dropdown-toggle" href="#">
<img id="headerIcon" alt="" src="@Url.Content(Model.Icon)"> <img id="headerIcon" alt="" src="@Url.Content(Model.Icon)">
<span id="userDisplayName" class="username">@Model.DisplayName</span> <span id="userDisplayName" data-userName="@Model.UserName" class="username">@Model.DisplayName</span>
<b class="caret"></b> <b class="caret"></b>
</a> </a>
<ul class="dropdown-menu"> <ul class="dropdown-menu">