text: 
  
  
  
  // 页面加载执行  判断用户是否登录
  function load_data() {
      var theme = JSON.parse(localStorage.getItem('$userinfodata'));
      var countinfodata = JSON.parse(localStorage.getItem('$countinfodata'));
  
      if (theme == null || theme == '') {
          $('#login-wrap').show();
          $('#login-success').hide();
      } else {
          $('#login-wrap').hide();
          $('#login-success').show();
          $('#login-success .username').text(theme.username);
          $("#face").attr({
              src:theme.face
          });
          $('#name01').text(countinfodata.name);
      }
  }
  
  
  // 点击顶部退出按钮
  $('#exitlogin').click(function(){
      localStorage.removeItem('$userinfodata');
      load_data();
      window.location.href = '../html/signin.html';
  });
  
  
  $('#personal').click(function(){
      var theme=JSON.parse(localStorage.getItem('$userinfodata'));
      if(theme == null|| theme == ''){
          alert('您还未登录，请先登录~');      
          window.location.href = "../html/signin.html";
      }else{
          window.location.href = "../html/personal.html?username="+theme.username;
      }
  });
  
  
  
  $('#backstage').click(function(){
      var theme=JSON.parse(localStorage.getItem('$userinfodata'));
      if(theme == null|| theme == ''){
          alert('您还未登录，请先登录~');      
          window.location.href = "../html/signin.html";
      }else if(theme.username == 'admin'){
          window.location.href = "../html/backStage.html?username="+theme.username;
      }else{
          alert('您的权限不足~');     
      }
  });
  
  $('#mooccolumn').click(function(){
      var theme=JSON.parse(localStorage.getItem('$userinfodata'));
      if(theme == null|| theme == ''){     
          window.location.href = "../html/moocColumn.html";
      }else{
          window.location.href = "../html/moocColumn.html?username="+theme.username;
      }
  });
  
  $('#course').click(function(){
      var theme=JSON.parse(localStorage.getItem('$userinfodata'));
      if(theme == null|| theme == ''){     
          window.location.href = "../html/course.html";
      }else{
          window.location.href = "../html/course.html?username="+theme.username;
      }
  });
  $('#index').click(function(){
      var theme=JSON.parse(localStorage.getItem('$userinfodata'));
      if(theme == null|| theme == ''){     
          window.location.href = "../index.html";
      }else{
          window.location.href = "../index.html?username="+theme.username;
      }
  });
  $('#allcourse').click(function(){
      var theme=JSON.parse(localStorage.getItem('$userinfodata'));
      if(theme == null|| theme == ''){     
          window.location.href = "../html/backStage.html";
      }else{
          window.location.href = "../html/backStage.html?username="+theme.username;
      }
  });
  $('#coursemanage').click(function(){
      var theme=JSON.parse(localStorage.getItem('$userinfodata'));
      if(theme == null|| theme == ''){     
          window.location.href = "../html/course-manage.html";
      }else{
          window.location.href = "../html/course-manage.html?username="+theme.username;
      }
  });
  $('#history').click(function(){
      var theme=JSON.parse(localStorage.getItem('$userinfodata'));
      if(theme == null|| theme == ''){     
          window.location.href = "../html/history.html";
      }else{
          window.location.href = "../html/history.html?username="+theme.username;
      }
  });
  
  
  