...
|
...
|
@@ -81,8 +81,10 @@ 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:[]};
|
|
|
userInfo = { auth: userData, uid: userData.pid, name: userData.truename, right: {},shopList:[],brands:[]};
|
|
|
if(userData.data_authority&&userData.data_authority.brand&&userData.data_authority.brand.list){
|
|
|
userInfo.brands=Object.keys(userData.data_authority.brand.list);
|
|
|
}
|
|
|
allRes.data.forEach(function (data) {
|
|
|
if (data.platform_id == Iaccount.WEBSITE) {
|
|
|
userInfo.right[data.path] = true;
|
...
|
...
|
@@ -120,7 +122,7 @@ module.exports = { |
|
|
'x-user-name': user.auth.account,
|
|
|
'x-site-type': Iaccount.WEBSITE,
|
|
|
'x-client-ip': req.ip,
|
|
|
'x-user-brands': "1,2,3,4,5,6,7,8,9"
|
|
|
'x-user-brands': user.brands.join(',')
|
|
|
};
|
|
|
if (path && user.right[path]) {
|
|
|
common.isUsedMenuAuth(user.auth.pid,user.auth.role_id,path).done(function(isURes){
|
...
|
...
|
|