Blame view

js/index.js 2 KB
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
35
36
37
38
39
40
      $('#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());
  }
  // <!--底部-->
  //用户退出登录
  $('#login_out_btn').on('click', function () {
      // console.log("token:" + fn.getToken());
      fn.loginOut();
  });
515ff1ff   liuqimichale   rebuild
41
  
080a01e5   liuqimichale   集合平台
42
  $('#box li').on('click',function () {
bf30a091   liuqimichale   init
43
          var link = $(this).attr('data-link');
bf30a091   liuqimichale   init
44
45
46
47
48
49
         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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
  })
  var $box = $('#box')
  $box.boxSlider({
      speed: 1000
      , autoScroll: true
      , timeout: 5000
      , next: '#next'
      , prev: '#prev'
      , pause: '#pause'
      , effect: 'scrollHorz'
      , blindCount: 15
  
  });
  
  $('#controls').on('click', 'li', function (ev) {
      console.log($(this).data('slideindex'))
      $box.boxSlider('showSlide', $(this).data('slideindex'));
      //ev.preventDefault();
  });