Commit 5884a16f by 蒋勇

d

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