
<!DOCTYPE html>
<html>
<head>
  <meta charset="utf-8">
  <title>图书馆管理系统</title>
  <meta name="renderer" content="webkit">
  <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
  <meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=0">
  <link rel="stylesheet" href="/skin/default/layuiadmin/layui/css/layui.css" media="all">
  <link rel="stylesheet" href="/skin/default/layuiadmin/style/admin.css" media="all">
  <script src="/js/xss.js"></script>
  <script>
      /^http(s*):\/\//.test(location.href) || alert('请先部署到 localhost 下再访问');
  </script>
  <style>
    .noticeListBox {
      width: 500px;
      box-sizing: border-box;
      overflow: scroll;
      white-space: nowrap;
    }

    .noticeListBox::-webkit-scrollbar {
      display: none;
    }

    .noticeList{
      display: inline-block;
    }
  </style>
</head>
<body class="layui-layout-body">

<div id="LAY_app">
  <div class="layui-layout layui-layout-admin">
    <div class="layui-header">
      <!-- 头部区域 -->
      <ul class="layui-nav layui-layout-left">
        <li class="layui-nav-item layadmin-flexible" lay-unselect>
          <a href="javascript:;" layadmin-event="flexible" title="侧边伸缩">
            <i class="layui-icon layui-icon-shrink-right" id="LAY_app_flexible"></i>
          </a>
        </li>
        <li class="layui-nav-item layui-hide-xs" lay-unselect>
          <a href="javascript:;" layadmin-event="fullscreen">
            <i class="layui-icon layui-icon-screen-full"></i>
          </a>
        </li>
        <li class="layui-nav-item" lay-unselect>
          <a href="javascript:;" layadmin-event="refresh" title="刷新">
            <i class="layui-icon layui-icon-refresh-3"></i>
          </a>
        </li>
      </ul>
      <ul class="layui-nav layui-layout-right" lay-filter="layadmin-layout-right">
        <li class="layui-nav-item" style="width:400px;color:red;margin-left:100px;" >
          <marquee width="400"  behavior="" direction="">
            <span  id="warning"></span>
          </marquee>

        </li>

        <li class="layui-nav-item" style="width:50px;" lay-unselect>
          <a lay-href="/notice/receiveNoticeList" layadmin-event="message" lay-text="消息中心" id="msgpic">
            <i class="layui-icon layui-icon-notice"></i>
          </a>
        </li>

        <li class="layui-nav-item layui-hide-xs lxwm_header" lay-lxwm>
          <a href="javascript:;">
            <cite>联系客服</cite>
          </a>
          <dl class="layui-nav-child">
            <!--<dd><a lay-href="set/user/info.html">基本资料</a></dd>-->
            <dd> <a target="_blank" href="http://wpa.qq.com/msgrd?v=3&uin=2212730512&site=qq&menu=yes"><img border="0" src="https://pub.idqqimg.com/wpa/images/counseling_style_51.png" alt="点击这里给我发消息" title="点击这里给我发消息"/>金思维 小刘</a>
            </dd>
            <dd><a target="_blank" href="http://wpa.qq.com/msgrd?v=3&uin=237136016&site=qq&menu=yes"><img border="0" src="https://pub.idqqimg.com/wpa/images/counseling_style_51.png" alt="点击这里给我发消息" title="点击这里给我发消息"/>金思维 小万</a></dd>
            <dd><a target="_blank" href="http://wpa.qq.com/msgrd?v=3&uin=3170877300&site=qq&menu=yes"><img border="0" src="https://pub.idqqimg.com/wpa/images/counseling_style_51.png" alt="点击这里给我发消息" title="点击这里给我发消息"/>金思维 装备</a></dd>
            <dd><a href="#">客服电话：073185157311</a></dd>

          </dl>
        </li>



        <li class="layui-nav-item" lay-unselect>
          <a href="javascript:;">
            <cite id="username"></cite>
          </a>
          <dl class="layui-nav-child">
            <!--<dd><a lay-href="set/user/info.html">基本资料</a></dd>-->
            <dd><a lay-href="/user/password">修改密码</a></dd>
            <hr>
            <dd layadmin-event="logout" style="text-align: center;"><a>退出</a></dd>
          </dl>
        </li>

        <!--<li class="layui-nav-item layui-hide-xs" lay-unselect>-->
          <!--<a href="javascript:;" layadmin-event="about"><i class="layui-icon layui-icon-more-vertical"></i></a>-->
        <!--</li>-->
        <li class="layui-nav-item layui-show-xs-inline-block layui-hide-sm" lay-unselect>
          <a href="javascript:;" layadmin-event="more"><i class="layui-icon layui-icon-more-vertical"></i></a>
        </li>
      </ul>
    </div>

    <!-- 侧边菜单 -->
    <div class="layui-side layui-side-menu">
      <div class="layui-side-scroll">
        <div class="layui-logo" style="height:90px;">
          <!--<img src="../../../img/index-logo.png" height="50" width="50" id="orglogo" onerror="this.src='../../../img/index-logo.png'" >-->
          <div style="height:35px;color:white;" id="biaoti"></div>
          <div style="height:35px;color:white;">图书馆管理系统</div>
        </div>

        <ul class="layui-nav layui-nav-tree" lay-shrink="all" id="LAY-system-side-menu" lay-filter="layadmin-system-side-menu" >

        </ul>
      </div>
    </div>

    <!-- 页面标签 -->
    <div class="layadmin-pagetabs" id="LAY_app_tabs">
      <div class="layui-icon layadmin-tabs-control layui-icon-prev" layadmin-event="leftPage"></div>
      <div class="layui-icon layadmin-tabs-control layui-icon-next" layadmin-event="rightPage"></div>
      <div class="layui-icon layadmin-tabs-control layui-icon-down">
        <ul class="layui-nav layadmin-tabs-select" lay-filter="layadmin-pagetabs-nav">
          <li class="layui-nav-item" lay-unselect>
            <a href="javascript:;"></a>
            <dl class="layui-nav-child layui-anim-fadein">
              <dd layadmin-event="closeThisTabs"><a href="javascript:;">关闭当前标签页</a></dd>
              <dd layadmin-event="closeOtherTabs"><a href="javascript:;">关闭其它标签页</a></dd>
              <dd layadmin-event="closeAllTabs"><a href="javascript:;">关闭全部标签页</a></dd>
            </dl>
          </li>
        </ul>
      </div>
      <div class="layui-tab" lay-unauto lay-allowClose="true" lay-filter="layadmin-layout-tabs">
        <ul class="layui-tab-title" id="LAY_app_tabsheader">
          <li id="lipageid" lay-id="" lay-attr="" class="layui-this"><i class="layui-icon layui-icon-home"></i></li>
        </ul>
      </div>
    </div>


    <!-- 主体内容 -->
    <div class="layui-body" id="LAY_app_body">
      <div class="layadmin-tabsbody-item layui-show">
        <iframe id="iframepageid" src="" frameborder="0" class="layadmin-iframe"></iframe>
      </div>
    </div>

    <!-- 辅助元素，一般用于移动设备下遮罩 -->
    <div class="layadmin-body-shade" layadmin-event="shade"></div>
  </div>
</div>

<script src="/skin/default/layuiadmin/layui/layui.js"></script>
<script>
    layui.config({
        base: '/skin/default/layuiadmin/' //静态资源所在路径
    }).extend({
        index: 'lib/index' //主入口模块
    }).use('index');
    layui.use(['jquery', 'layer'], function(){
        var $ = layui.$ //重点处
            ,layer = layui.layer;
        $.ajax({
            url:"/schoolindex/getbiaoti",
            data:{token:''},
            type:"GET",
            success:function (result) {
                if(result.data){
                    $("#biaoti").html(result.data);
                }

            }
        });


        $("#lipageid").attr("lay-id","/skin/default/views/home/schoolHomePage.html");
        $("#lipageid").attr("lay-attr","/skin/default/views/home/schoolHomePage.html");
        $("#iframepageid").attr("src","/skin/default/views/home/schoolHomePage.html");

        var realname = filterXSS(JSON.parse(sessionStorage.loginData).realname);
        $("#username").append(realname);
        $.post("/menu/findMenuByUser",{userid:JSON.parse(sessionStorage.loginData).id},function (result) {
            var menuhtml = "";
            for(var i=0;i<result.data.length;i++) {
                var item = result.data[i];
                if (item.pid == 0) {
                    menuhtml += '<li data-name="home" class="layui-nav-item nav-menu" >' +
                        '              <a href="javascript:;" lay-tips="' + filterXSS(item.menuname) + '" lay-direction="2">' +
                        '                <i class="layui-icon"><img src="/img/lf-icon-'+i+'.png" alt=""></i>' +
                        '                <cite>' + filterXSS(item.menuname) + '</cite>' +
                        '              </a>';
                    for(var j=0;j<item.submenu.length;j++){
                        var subitem = item.submenu[j];
                        menuhtml += '              <dl class="layui-nav-child">' +
                            '                <dd data-name="console">' +
                            '                  <a lay-href="' + filterXSS(subitem.url) + '">' + filterXSS(subitem.menuname) + '</a>' +
                            '                </dd>' +
                            '              </dl>';
                    };
                    menuhtml += '            </li>';
                }

            };

            $("#LAY-system-side-menu").append(menuhtml);
            layui.use(['element','layer'], function(){
                var element = layui.element; //导航的hover效果、二级菜单等功能，需要依赖element模块
                element.init();
            });
        });
        $.get("/notice/unreadNum",{orgid:JSON.parse(sessionStorage.loginData).orgid}, function (result) {
            if(result.data > 0) {
                $("#msgpic").append("<span class=\"layui-badge-dot\"></span>");
            }
        });
        $.ajax({
            url:"/auth/orgLogo",
            data:{orgid:JSON.parse(sessionStorage.loginData).orgid},
            type:"GET",
            success:function (result) {
                if(result.data){
                    document.getElementById("orglogo").src = result.data;
                    //$("#orglogo").src("../../../img/index-logo.png");
                }

            }
        });
        $.ajax({
          url:"/org/validateOrgDate",
          data:{orgid:JSON.parse(sessionStorage.loginData).orgid},
          type:"GET",
          success:function (result) {
            if(result.data){
              $("#warning").html(result.data);
            }

          }
        });



    });




</script>


</body>
</html>


