|
|
@@ -42,6 +42,15 @@
|
|
|
},
|
|
|
refreshMenuActive:function(jsonArray,_id){
|
|
|
for(var menuIndex =0 ; menuIndex < jsonArray.length;menuIndex ++){
|
|
|
+
|
|
|
+ if(jsonArray[menuIndex].hasOwnProperty('childs')){
|
|
|
+ var _childs = jsonArray[menuIndex].childs;
|
|
|
+ _childs.sort(function(_child,_newChild){
|
|
|
+ return _child.seq - _newChild.seq
|
|
|
+ });
|
|
|
+ jsonArray[menuIndex].childs = _childs;
|
|
|
+ }
|
|
|
+
|
|
|
if(_id === jsonArray[menuIndex].id){
|
|
|
if(jsonArray[menuIndex].active === true){
|
|
|
//如果当前本身是打开状态,说明 需要关闭
|
|
|
@@ -54,6 +63,10 @@
|
|
|
jsonArray[menuIndex].active=false;
|
|
|
}
|
|
|
|
|
|
+ jsonArray.sort(function(a,b){
|
|
|
+ return a.seq - b.seq
|
|
|
+ });
|
|
|
+
|
|
|
return jsonArray;
|
|
|
},
|
|
|
switchMenu:function(_id){
|