Authored by xuhongyun

增加登录用户名及角色信息

... ... @@ -81,7 +81,7 @@ module.exports = {
}
common.Ilogin(user, password).allRight().sessionAsync(user, password).done(function (IloginRes,allRes,sesRes) {
var userData = IloginRes.data, cookie = sesRes.caseless.dict["set-cookie"];
userInfo = { auth: userData, uid: userData.pid, name: userData.truename, right: {},shopList:[],brands:[]};
userInfo = { auth: userData, uid: userData.pid, name: userData.truename, role: userData.roleName, right: {},shopList:[],brands:[]};
if(userData.data_authority&&userData.data_authority.brand&&userData.data_authority.brand.list){
userInfo.brands=userData.data_authority.brand.is_all?"0":Object.keys(userData.data_authority.brand.list);
}
... ...
... ... @@ -13,6 +13,16 @@
<%if _locals.session.user.auth %>
<div class="pull-right">
<div class="btn-group btn-group-list btn-group-notification">
<button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown">
<i class="glyphicon glyphicon-user"></i>
<!--登录的用户角色-->
<span class="badge"><%_locals.session.user.role%></span>
<!--登录的用户真实名称-->
<span class="badge"><%_locals.session.user.name%></span>
</button>
</div>
<div class="btn-group btn-group-list btn-group-notification">
<button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown">
<i class="fa fa-bell-o"></i>
... ...
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
... ... @@ -81,7 +81,7 @@ module.exports = {
}
common.Ilogin(user, password).allRight().sessionAsync(user, password).done(function (IloginRes,allRes,sesRes) {
var userData = IloginRes.data, cookie = sesRes.caseless.dict["set-cookie"];
userInfo = { auth: userData, uid: userData.pid, name: userData.truename, right: {},shopList:[],brands:[]};
userInfo = { auth: userData, uid: userData.pid, name: userData.truename, role: userData.roleName, right: {},shopList:[],brands:[]};
if(userData.data_authority&&userData.data_authority.brand&&userData.data_authority.brand.list){
userInfo.brands=userData.data_authority.brand.is_all?"0":Object.keys(userData.data_authority.brand.list);
}
... ...
... ... @@ -13,6 +13,16 @@
<%if _locals.session.user.auth %>
<div class="pull-right">
<div class="btn-group btn-group-list btn-group-notification">
<button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown">
<i class="glyphicon glyphicon-user"></i>
<!--登录的用户角色-->
<span class="badge"><%_locals.session.user.role%></span>
<!--登录的用户真实名称-->
<span class="badge"><%_locals.session.user.name%></span>
</button>
</div>
<div class="btn-group btn-group-list btn-group-notification">
<button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown">
<i class="fa fa-bell-o"></i>
... ...