<!DOCTYPE html>
<html>

<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta name="renderer" content="webkit">

    <title>管理后台</title>

    <!--[if lt IE 8]>
    <script>
        alert('H+已不支持IE6-8，请使用谷歌、火狐等浏览器\n或360、QQ等国产浏览器的极速模式浏览本页面！');
    </script>
    <![endif]-->

    <link href="/base/css/bootstrap.min.css?v=3.4.0" rel="stylesheet">
    <link href="/base/css/font-awesome.min.css?v=4.3.0" rel="stylesheet">
    <link href="/base/css/animate.min.css" rel="stylesheet">
    <link href="/base/css/style.min.css?v={{config("sys.version")}}" rel="stylesheet">
    <link rel="stylesheet" href="https://at.alicdn.com/t/font_2246785_af5k303mvp.css">
    <style type="text/css">
        #side-menu .nav-header {
            color: rgba(244, 240, 240, 100);
            padding: 15px;
            text-align: center;
        }

        .sg-nav-top {
            display: flex;
            align-items: center;
            height: 50px;
            padding: 0 30px;
        }

        .sg-nav-top .sg-username {
            margin-right: 15px;
        }

        .sg-avatar {
            width: 30px;
            height: 30px;
            border-radius: 50%;
            margin-right: 15px;
        }

        .sg-logout-btn {
            color: black;
        }

        #sg-app #content-main {
            height: calc(100% - 58px);
        }

        #sg-app .navbar-static-top {
            background: white;
        }

        #side-menu .nav-header {
            background: #002140;
            font-weight: bold;
        }

        #sg-app .sidebar-collapse {
            background: #101010;
        }

        #sg-app .sg-nav-item {
            display: flex;
            align-items: center;
            justify-content: space-between;
        }
        #sg-app .sg-nav-item:focus {
            background: #101010;
        }
        #sg-app .J_menuItem:focus,
        #sg-app .J_menuItem.sg-selected {
            background: #1990FF;
            color: white;
        }
        .J_menuItem:hover {
            background: #1990FF;
        }
        #sg-app .nav>li.active {
            background: rgba(0, 21, 41, 100);
            border-width: 0;
        }
        #sg-app .sg-nav-item:hover,
        #sg-app .sg-nav-item>li>a:focus {
            background: rgba(0, 21, 41, 100);
        }
        #sg-app .nav-second-level li a:hover {
            background: #1990FF;
        }
        .mini-navbar .sg-nav-item > i {
            display: none;
        }
        * {
            touch-action: none;
        }
    </style>
</head>

<body class="fixed-sidebar full-height-layout gray-bg" id="sg-app">
<div id="wrapper">
    <!--左侧导航开始-->
    <nav class="navbar-default navbar-static-side" role="navigation">
        <div class="nav-close"><i class="fa fa-times-circle"></i>
        </div>
        <div class="sidebar-collapse">
            <ul class="nav" id="side-menu">
                <li class="nav-header">
                    {{ isset($title) ? $title : '中体二局小程序' }}
                </li>
                @if(isset($menus))
                    @foreach($menus as $key => $val)
                        <li>
                            <a href="<?php if ($val['path'] == '#') {
                                echo "#";
                            } else {
                                echo U("{$val['path']}");
                            }?>" class="sg-nav-item">
                                <div class="sg-nav-left">
                                    <i class="fa {{$val['ico']}}"></i>
                                    <span class="nav-label">{{$val['name']}}</span>
                                </div>
                                @if(isset($val['_child']))
                                    <i class="glyphicon glyphicon-chevron-right sg-nav-arrow" data-collapse="false"></i>
                                @endif
                            </a>
                            @if(isset($val['_child']))
                                <span class="fa arrow"></span>
                                <ul class="nav nav-second-level">
                                    @foreach($val['_child'] as $key2 => $val2)
                                        <li>
                                            <a @if($val2['path']=='order_export')target="_blank"
                                               @else class="J_menuItem" @endif href="<?php if ($val2['path'] == '#') {
                                                echo "#";
                                            } else {
                                                echo U("{$val2['path']}");
                                            }?>" data-index="0" style="display: flex; align-items: center; justify-content: space-between;">
                                                <div class="sg-nav-left">
                                                    <span class="nav-label">{{$val2['name']}}</span>
                                                </div>
                                                @if(isset($val2['_child']))
                                                    <i class="glyphicon glyphicon-chevron-right sg-nav-arrow" data-collapse="false"></i>
                                                @endif
                                            </a>
                                            @if(isset($val2['_child']))
                                                <span class="fa arrow"></span>
                                                <ul class="nav nav-second-level">
                                                    @foreach($val2['_child'] as $key3 => $val3)
                                                        <li>
                                                            <a @if($val3['path']=='order_export')target="_blank"
                                                               @else class="J_menuItem" @endif href="<?php if ($val2['path'] == '#') {
                                                                echo "#";
                                                            } else {
                                                                echo U("{$val3['path']}");
                                                            }?>" data-index="0" style="padding-left: 80px">{{$val3['name']}}</a>
                                                        </li>
                                                    @endforeach
                                                </ul>
                                            @endif
                                        </li>
                                    @endforeach
                                </ul>
                            @endif

                        </li>
                    @endforeach
                @endif
            </ul>
        </div>
    </nav>
    <!--左侧导航结束-->
    <!--右侧部分开始-->
    <div id="page-wrapper" class="gray-bg dashbard-1">
        <div class="row border-bottom">
            <nav class="navbar navbar-static-top" role="navigation" style="margin-bottom: 0">
                <div class="navbar-header"><a class="navbar-minimalize minimalize-styl-2" href="#">
                        <svg xmlns="http://www.w3.org/2000/svg" viewBox="64 64 896 896" width="20" height="20"
                             style="fill: rgba(89,89,89,1);">
                            <path d="M408 442h480c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8H408c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8zm-8 204c0 4.4 3.6 8 8 8h480c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8H408c-4.4 0-8 3.6-8 8v56zm504-486H120c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm0 632H120c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zM142.4 642.1L298.7 519a8.84 8.84 0 0 0 0-13.9L142.4 381.9c-5.8-4.6-14.4-.5-14.4 6.9v246.3a8.9 8.9 0 0 0 14.4 7z"></path>
                        </svg>
                    </a>
                    {{--<form role="search" class="navbar-form-custom" method="post" action="search_results.html">--}}
                    {{--<div class="form-group">--}}
                    {{--<input type="text" placeholder="请输入您需要查找的内容 …" class="form-control" name="top-search" id="top-search">--}}
                    {{--</div>--}}
                    {{--</form>--}}
                </div>
                <ul class="nav navbar-top-links navbar-right sg-nav-top">
                    <img src="/images/avatar.png" class="sg-avatar">
                    <div class="sg-username">{{ $_user->name }}</div>
                    <a href="/admin/logout" class="sg-logout-btn">退出</a>
                </ul>
            </nav>
        </div>
        <div class="row J_mainContent" id="content-main">
            <iframe class="J_iframe" name="iframe0" width="100%" height="100%" src="{{ isset($url) ? $url : U('Base/Index/welcome')}}"
                    frameborder="0" data-id="index_v1.html" seamless></iframe>
        </div>
        {{--            <div class="footer">--}}
        {{--                <div class="pull-right">&copy; 2014-2019 <a href="http://www.9026.com/" target="_blank">思维定制</a>--}}
        {{--                </div>--}}
        {{--            </div>--}}
    </div>
    <!--右侧部分结束-->
    <!--右侧边栏开始-->
    <div id="right-sidebar">

    </div>
    <!--右侧边栏结束-->
    <!-- 全局js -->
    <script src="/base/js/jquery-2.1.1.min.js?v={{config("sys.version")}}"></script>
    <script src="/base/js/bootstrap.min.js?v=3.4.0"></script>
    <script src="/base/js/plugins/metisMenu/jquery.metisMenu.js?v={{config("sys.version")}}"></script>
    <script src="/base/js/plugins/slimscroll/jquery.slimscroll.min.js?v={{config("sys.version")}}"></script>
    <script src="/base/js/plugins/layer/layer.min.js?v={{config("sys.version")}}"></script>

    <!-- 自定义js -->
    <script src="/base/js/hplus.min.js?v=3.2.0"></script>
    <script type="text/javascript" src="/base/js/contabs.min.js?v={{config("sys.version")}}"></script>

    <!-- 第三方插件 -->
    <script src="/base/js/plugins/pace/pace.min.js?v={{config("sys.version")}}"></script>


    <script type="text/javascript">
        $(function () {
            $('.sg-nav-item').on('click', function () {
                var $ele = $(this).find('.sg-nav-arrow');
                if($ele) {
                    var collapse = $ele.attr('data-collapse') === 'false' ? "true" : "false";
                    // console.log(collapse)
                    if(collapse === "true") {
                        $('.glyphicon-chevron-down').removeClass('glyphicon-chevron-down').addClass('glyphicon-chevron-right').attr('data-collapse', 'false');
                        $ele.removeClass('glyphicon-chevron-right').addClass('glyphicon-chevron-down')
                    } else $ele.removeClass('glyphicon-chevron-down').addClass('glyphicon-chevron-right');
                    $ele.attr('data-collapse', collapse);
                }
            });
            $('.J_menuItem').on('click', function () {
                $('.sg-selected').removeClass('sg-selected');
                $(this).addClass('sg-selected');
            });
        })
    </script>
</div>
</body>

</html>