515ff1ff
liuqimichale
rebuild
|
1
|
|
bf30a091
liuqimichale
init
|
2
3
4
5
6
|
// <!--内容-->
// fn.getUserName();
console.log(fn.getUserName());
if(fn.getUserName()==''|| fn.getUserName()==undefined||fn.getUserName()==null){
|
515ff1ff
liuqimichale
rebuild
|
7
|
fn.loginOut();
|
bf30a091
liuqimichale
init
|
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
|
$('#topbar_userMsg').hide();
$('#topbar_tologin').show();
}else if(fn.getUserName()=='燕松梅赤峰测试'){
$('#topbar_tologin').hide();
$('#topbar_userMsg').show().find('#userId').text(fn.getUserName());
$('#onlyInterLogin').attr('data-link','http://www.rnting.com/api/index.html');
console.log($('#onlyInterLogin').html());
}else if(fn.getUserName()=='财务汇报'){
$('#topbar_tologin').hide();
$('#topbar_userMsg').show().find('#userId').text(fn.getUserName());
//monPlat 监控平台
$('#monPlat').attr('data-link','');
//cfgov_data 数据平台
$('#cfgov_data').attr('data-link','');
//onlyInterLogin 接口平台
$('#onlyInterLogin').attr('data-link','');
//gprmxc 备案
$('#gprmxc').attr('data-link','');
//caruser_msg 车主平台
$('#caruser_msg').attr('data-link','');
}
else{
$('#topbar_tologin').hide();
$('#topbar_userMsg').show().find('#userId').text(fn.getUserName());
}
|
57746651
Andy
接口请求 菜单
|
35
36
37
38
39
40
41
42
43
44
45
46
47
|
// 获取页面可显示的系统菜单以及目录样式 sysOpProjectDTOList
var fun={
init:function(){
//content 图片内容 清空
$('#box').empty();
//nav 菜单 清空
$('#controls').empty();
//加载 菜单 以及 各系统简介图片内容
fun.menuInit();
//用户退出登录
fun.loginOut();
},
menuInit:function () {
|
57746651
Andy
接口请求 菜单
|
48
49
|
//nav 菜单
var menuList='';
|
5a879810
Andy
add 优化
|
50
|
//content 图片内容s
|
57746651
Andy
接口请求 菜单
|
51
|
var imgList='';
|
9c9bc393
Andy
接口返回校验
|
52
|
var sysOpList=sessionStorage.getItem("sysOpProjectDTOList");
|
16cd6882
Andy
add test分支
|
53
54
|
debugger
if(sysOpList=='' ||sysOpList==null ||sysOpList==undefined ||sysOpList=='[]'){
|
00e820fa
liuqimichale
集合平台 导航
|
55
|
menuList+='<li class="parking-nav active" data-slideindex="6">任你停官网</li>';
|
9c9bc393
Andy
接口返回校验
|
56
|
imgList='<li class="parking-wrap" data-link="http://www.renniting.cn"></li>';
|
00e820fa
liuqimichale
集合平台 导航
|
57
|
// menuList+='<li class="clearfix"></li>';
|
16cd6882
Andy
add test分支
|
58
59
60
61
|
$('#box').append(imgList);
$('#controls').append(menuList);
}else {
var sysOpProList=JSON.parse(sysOpList);
|
9c9bc393
Andy
接口返回校验
|
62
|
|
16cd6882
Andy
add test分支
|
63
64
|
console.log(sysOpProList)
for(var i=0;i<sysOpProList.length;i++){
|
57746651
Andy
接口请求 菜单
|
65
|
if(sysOpProList[i].projectCode=='BUSINESS_PLATFORM'){
|
16cd6882
Andy
add test分支
|
66
|
|
57746651
Andy
接口请求 菜单
|
67
|
menuList+='<li class="parking-nav active" data-slideindex="0">'+sysOpProList[i].projectName+'</li>';
|
5a879810
Andy
add 优化
|
68
|
imgList+='<li class="parking-wrap" data-link="'+sysOpProList[i].projectUrl+'"></li>';
|
57746651
Andy
接口请求 菜单
|
69
70
|
}
|
9c9bc393
Andy
接口返回校验
|
71
|
else if(sysOpProList[i].projectCode=='GOVERNMENT_PLATFORM'){
|
16cd6882
Andy
add test分支
|
72
|
|
57746651
Andy
接口请求 菜单
|
73
|
menuList+='<li class="platform-nav" data-slideindex="1">'+sysOpProList[i].projectName+'</li>';
|
5a879810
Andy
add 优化
|
74
|
imgList+='<li class="platform-wrap" data-link="'+sysOpProList[i].projectUrl+'"></li>';
|
57746651
Andy
接口请求 菜单
|
75
|
}
|
9c9bc393
Andy
接口返回校验
|
76
|
else if(sysOpProList[i].projectCode=='INTERFACE_PLATFORM'){
|
16cd6882
Andy
add test分支
|
77
|
|
57746651
Andy
接口请求 菜单
|
78
|
menuList+='<li class="api-nav" data-slideindex="2">'+sysOpProList[i].projectName+'</li>';
|
5a879810
Andy
add 优化
|
79
|
imgList+='<li class="api-wrap" data-link="'+sysOpProList[i].projectUrl+'"></li>';
|
57746651
Andy
接口请求 菜单
|
80
|
}
|
9c9bc393
Andy
接口返回校验
|
81
|
else if(sysOpProList[i].projectCode=='CAR_USER_PLATFORM'){
|
16cd6882
Andy
add test分支
|
82
|
|
57746651
Andy
接口请求 菜单
|
83
|
menuList+='<li class="caruser-nav" data-slideindex="3">'+sysOpProList[i].projectName+'</li>';
|
5a879810
Andy
add 优化
|
84
|
imgList+='<li class="caruser-wrap" data-link="'+sysOpProList[i].projectUrl+'"></li>';
|
57746651
Andy
接口请求 菜单
|
85
|
}
|
9c9bc393
Andy
接口返回校验
|
86
|
else if(sysOpProList[i].projectCode=='BEIAN_PLATFORM'){
|
16cd6882
Andy
add test分支
|
87
|
|
57746651
Andy
接口请求 菜单
|
88
|
menuList+='<li class="gprmxc-nav" data-slideindex="4">'+sysOpProList[i].projectName+'</li>';
|
5a879810
Andy
add 优化
|
89
|
imgList+='<li class="gprmxc-wrap" data-link="'+sysOpProList[i].projectUrl+'"></li>';
|
57746651
Andy
接口请求 菜单
|
90
|
}
|
00e820fa
liuqimichale
集合平台 导航
|
91
92
|
|
16cd6882
Andy
add test分支
|
93
94
95
96
97
|
}
menuList+='<div class="clearfix"></div>';
$('#box').append(imgList);
$('#controls').append(menuList);
|
57746651
Andy
接口请求 菜单
|
98
|
}
|
16cd6882
Andy
add test分支
|
99
100
|
|
57746651
Andy
接口请求 菜单
|
101
102
103
104
105
106
107
108
109
110
111
|
},
//用户退出登录
loginOut:function () {
$('#login_out_btn').on('click', function () {
// console.log("token:" + fn.getToken());
fn.loginOut();
});
}
};
fun.init();
|
bf30a091
liuqimichale
init
|
112
|
// <!--底部-->
|
515ff1ff
liuqimichale
rebuild
|
113
|
|
57746651
Andy
接口请求 菜单
|
114
115
|
$(document).on('click','#box li',function () {
|
bf30a091
liuqimichale
init
|
116
|
var link = $(this).attr('data-link');
|
bf30a091
liuqimichale
init
|
117
118
119
120
121
122
|
if(link.indexOf("monitoringPlatform")>0){
link+=("?token="+sessionStorage.getItem("token"));
} else if(link.indexOf("SubMenus/index.html")>0){
link+=("?token="+sessionStorage.getItem("token"));
}
window.open(link)
|
515ff1ff
liuqimichale
rebuild
|
123
124
125
126
|
})
var $box = $('#box')
$box.boxSlider({
speed: 1000
|
2ddbbcb2
Andy
add img zip
|
127
|
, autoScroll: false
|
515ff1ff
liuqimichale
rebuild
|
128
129
130
131
132
133
134
135
136
137
|
, timeout: 5000
, next: '#next'
, prev: '#prev'
, pause: '#pause'
, effect: 'scrollHorz'
, blindCount: 15
});
$('#controls').on('click', 'li', function (ev) {
|
abd1e2c0
Andy
add new icon 新备案 ...
|
138
139
|
$('#controls li').removeClass('active');
console.log($(this).data('slideindex'));
|
515ff1ff
liuqimichale
rebuild
|
140
|
$box.boxSlider('showSlide', $(this).data('slideindex'));
|
abd1e2c0
Andy
add new icon 新备案 ...
|
141
|
$(this).addClass('active');
|
515ff1ff
liuqimichale
rebuild
|
142
143
|
//ev.preventDefault();
});
|