Commit 49c60049 by 孙亚楠

dd

parent 39f294d4
......@@ -72,7 +72,8 @@ class AuthService extends ServiceBase {
}
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 = {};
for (var item of all) {
......@@ -88,7 +89,11 @@ class AuthService extends ServiceBase {
for(var item of all) {
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) {
......
......@@ -208,7 +208,7 @@ class UserService extends ServiceBase {
isMain: obj.isMain || 0,
}
if (user.uctype === 1) {
if (Number(this.trim(user.uctype)) === 1) {
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