Commit 49c60049 by 孙亚楠

dd

parent 39f294d4
...@@ -72,7 +72,8 @@ class AuthService extends ServiceBase { ...@@ -72,7 +72,8 @@ class AuthService extends ServiceBase {
} }
async tree(params) { async tree(params) {
var all = await this.dao.all(params.saas_id, "id, orgname, path, pid"); try {
var all = await this.dao.all(params.saas_id, "id,name,path,pid");
var pmap = {}; var pmap = {};
for (var item of all) { for (var item of all) {
...@@ -88,7 +89,11 @@ class AuthService extends ServiceBase { ...@@ -88,7 +89,11 @@ class AuthService extends ServiceBase {
for(var item of all) { for(var item of all) {
item.children = pmap[item.id] || []; item.children = pmap[item.id] || [];
} }
return system.getResultSuccess(pmap[0][0]); return system.getResultSuccess(pmap[0]);
} catch (error) {
return system.getResult(error);
}
} }
async byRoleIds(params) { async byRoleIds(params) {
......
...@@ -208,7 +208,7 @@ class UserService extends ServiceBase { ...@@ -208,7 +208,7 @@ class UserService extends ServiceBase {
isMain: obj.isMain || 0, isMain: obj.isMain || 0,
} }
if (user.uctype === 1) { if (Number(this.trim(user.uctype)) === 1) {
user.orgpath = isMain ? org.path : org.path + "/" + id; user.orgpath = isMain ? org.path : org.path + "/" + id;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment