<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <meta name="csrf-token" content="{{ csrf_token() }}">
    <title>后台管理</title>
    <meta name="renderer" content="webkit|ie-comp|ie-stand">
    <meta name="description" content="">
    <meta name="keywords" content="">
    <link rel="shortcut icon" href="/favicon.png" type="image/x-icon">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta http-equiv="Cache-Control" content="no-siteapp"/>
    <link rel="stylesheet" href="/css/admin/font.css">
    <link rel="stylesheet" href="/css/admin/weadmin.css">
    <link rel="stylesheet" href="/css/admin/datepicker.min.css">
    <link rel="stylesheet" href="/layui/css/formSelects-v4.css">
    {{--<link rel="stylesheet" href="/qrcode/static/css/style.css">--}}
    <link rel="stylesheet" href="/wangedit/wangEditor.min.css">
    <link rel="stylesheet" href="/froala_editor/css/froala_editor.pkgd.min.css">

    <script src="/js/jquery.min.js"></script>
    <script src="/layui/layui.js" charset="utf-8"></script>
    <script src="/js/admin/datepicker.min.js"></script>
    <script src="/js/admin/datepicker.zh-CN.js"></script>
    <script src="/wangedit/wangEditor.min.js"></script>
    <script src="/froala_editor/js/froala_editor.pkgd.min.js"></script>
    <script src="/froala_editor/js/languages/zh_cn.js"></script>
    <script src="/js/tinymce/tinymce.min.js"></script>

    {{-- Laravel Mix - CSS File --}}
    {{--    <link rel="stylesheet" href="{{ mix('css/admin/public.css') }}">--}}
    <link rel="stylesheet" href="/css/admin/public.css">
    <style>
        .layui-btn-normal {
            background-color: #52c41a;
        }

        .layui-btn-danger {
            background-color: #f5222d;
        }

        .layui-btn-default {
            border: 1px solid #C9C9C9;
            background-color: #fff;
            color: #555;
        }

        .layui-btn-default:hover {
            border-color: #2d6dcc;
            color: #2d6dcc;
        }

        .layui-layer-close {
            background-color: #fff;
        }

        .layui-btn-disabled, .layui-btn-disabled:active, .layui-btn-disabled:hover {
            border: 1px solid #e6e6e6;
            background-color: #FBFBFB;
            color: #C9C9C9;
            cursor: not-allowed;
            opacity: 1;
        }

        .layui-form-checked span, .layui-form-checked:hover span {
            color: #fff;
            background-color: #2d6dcc;
        }

        .layui-form-checked i, .layui-form-checked:hover i {
            color: #2d6dcc;
        }

        .xm-select-parent .xm-form-select dl {
            z-index: 19891116;
        }

        .layui-layer.layui-layer-page .layui-layer-content {
            overflow: inherit;
        }

        .layui-table td {
            max-width: 600px;
            word-wrap: break-word;
        }
    </style>
</head>

<body>
<div class="weadmin-nav">
	<span class="layui-breadcrumb">
        @include('admin::component.breadcrumb', ['menus' => $menus, 'num' => 0])
    </span>
    <a class="layui-btn layui-btn-sm" style="line-height:1.6em;margin-top:3px;float:right"
       href="javascript:location.replace(location.href);" title="刷新">
        <i class="layui-icon" style="line-height:30px">ဂ</i></a>
</div>
<div class="weadmin-body">
    {!! $content !!}
</div>
</body>
<script>
    var gload = '';

    $.ajaxSetup({
        cache: false,
        headers: {
            'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content')
        },
        xhrFields: {
            withCredentials: true
        },
        beforeSend: function () {  // 请求发送前通用程序
            gload = layer.load(3, {shade: 0.3});
        },
        complete: function (res) {  // 请求发送结束后通用程序
            layer.close(gload);
            //登陆过期，则跳转到登录页面
            if (res.status == 401) {
                layer.alert('登陆超时了，您将跳转到登陆页!', function () {
                    location.href = '/admin/login';
                });
            }
        }
    });
    layui.extend({
        admin: '/js/admin/admin',
        formSelects: '/layui/extends/formSelects-v4.min',
    });
    layui.use(['admin', 'form'], function () {
        var admin = layui.admin, form = layui.form;
        form.on('select', function (data) {
            // console.log(data.elem); //得到select原始DOM对象
            // console.log(data.value); //得到被选中的值
            // console.log(data.othis); //得到美化后的DOM对象
            var old_value = data.othis.find('input').val();
            data.othis.find('input').val(old_value.trim());
        });
        // if ($('.layui-input.layui-unselect').val() !== undefined) {
        //     $('.layui-input.layui-unselect').val($('.layui-input.layui-unselect').val().trim());
        // }
        $('.layui-input.layui-unselect').each(function () {
            var self = $(this);
            if (self.val() !== undefined) {
                self.val(self.val().trim());
            }
        });

        $('body').on('click', '.weAdminEdit', function () {
            var self = $(this);
            WeAdminEdit(self.attr('href'), self.text());
            return false;
        })

        $('body').on('click', '.newWindow', function () {
            var self = $(this);
            window.open(self.attr('href'), '_blank');
            return false;
        })
    });
    $('body').on('click', '.layui-unselect.layui-form-checkbox', function () {
        var self = $(this);
        self.toggleClass('layui-form-checked');
    })

</script>
</html>
