|
@@ -42,29 +42,27 @@ function loginout(){
|
42
|
42
|
|
43
|
43
|
function getMenu(){
|
44
|
44
|
var openIndex = 0, data = {data:[{"name":"预测管理","parent_id":"0","url":"prediction.html"},{"name":"用户管理","parent_id":"0","url":"management.html"},{"name":"火钻管理","parent_id":"0","url":"pierer.html"}]};
|
45
|
|
- $("#menu").html($.Template7.renderTpl("menu_template",data));
|
46
|
|
- $("#menu>li:eq("+openIndex+")>ul.contentTxt").removeClass("contentTxt");
|
47
|
45
|
/*ajax({url:"api/?a=public&act=menu",data:{},callBack:function(res){
|
48
|
|
- if(res.code == 1){
|
49
|
|
- $.each(res.data,function(index, items){
|
|
46
|
+ if(res.code == 1){*/
|
|
47
|
+ $.each(data,function(index, items){
|
50
|
48
|
if(getPageName(items.url)){
|
51
|
49
|
openIndex = index;
|
52
|
|
- res.data[index]['parentIndex'] = true;
|
|
50
|
+ data[index]['parentIndex'] = true;
|
53
|
51
|
}
|
54
|
52
|
if(items.list.length > 0){
|
55
|
53
|
$.each(items.list,function(i, item){
|
56
|
54
|
if(getPageName(item.url)){
|
57
|
55
|
openIndex = index;
|
58
|
|
- res.data[index]['parentIndex'] = true;
|
59
|
|
- res.data[index]['list'][i]['subIndex'] = true;
|
|
56
|
+ data[index]['parentIndex'] = true;
|
|
57
|
+ data[index]['list'][i]['subIndex'] = true;
|
60
|
58
|
}
|
61
|
59
|
});
|
62
|
60
|
}else
|
63
|
|
- delete res.data[index]['list'];
|
|
61
|
+ delete data[index]['list'];
|
64
|
62
|
});
|
65
|
63
|
$("#menu").html($.Template7.renderTpl("menu_template",res));
|
66
|
64
|
$("#menu>li:eq("+openIndex+")>ul.contentTxt").removeClass("contentTxt");
|
67
|
|
- }
|
|
65
|
+ /*}
|
68
|
66
|
},load:false});*/
|
69
|
67
|
}
|
70
|
68
|
|