Commit 5884a16f by 蒋勇

d

parent b47f5f64
...@@ -84,20 +84,14 @@ class AppService extends ServiceBase { ...@@ -84,20 +84,14 @@ class AppService extends ServiceBase {
return app; return app;
}); });
} }
async translateWithBizCode(funcobjs,parentfunc) { async translateInitSels(funcobjs) {
funcobjs.forEach((item) => { funcobjs.forEach((item) => {
if (item.children) { console.log(item.title)
if(parentfunc){ if (item.children && item.children.length>0) {
item.codepath=parentfunc.codepath+"/"+item.name this.translateInitSels(item.children)
}else{
item.codepath=item.name
}
this.translateWithBizCode(item.children,item)
} else { } else {
if(parentfunc){ if(item.auths && item.auths.length>0){
item.codepath=parentfunc.codepath+"/"+item.name item.sels=[]
}else{
item.codepath=item.name
} }
} }
}) })
...@@ -108,7 +102,7 @@ class AppService extends ServiceBase { ...@@ -108,7 +102,7 @@ class AppService extends ServiceBase {
//如果存在functionJSON,那么就需要转换,构建编码路径 //如果存在functionJSON,那么就需要转换,构建编码路径
if (pobj.funcJson) { if (pobj.funcJson) {
// let funcobjs = JSON.parse(pobj.functionJSON) // let funcobjs = JSON.parse(pobj.functionJSON)
// await self.translateWithBizCode(funcobjs,null) await self.translateInitSels(pobj.funcJson)
pobj.functionJSON= JSON.stringify(pobj.funcJson) pobj.functionJSON= JSON.stringify(pobj.funcJson)
} }
let appcache=await self.cacheManager["AppCache"].cache(pobj.appkey); let appcache=await self.cacheManager["AppCache"].cache(pobj.appkey);
......
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