<html>
<head>
<title>数位板</title>
<meta http-equiv="Access-Control-Allow-Origin" content="*">
<link rel="stylesheet" href="__PUBLIC_JS__/layui/css/layui.css?v={:config('hisiphp.version')}">
<link rel="stylesheet" href="__ADMIN_CSS__/theme.css?v={:config('hisiphp.version')}">
<link rel="stylesheet" href="__ADMIN_CSS__/style.css?v={:config('hisiphp.version')}">
<link rel="stylesheet" href="__STATIC__/fonts/typicons/min.css?v={:config('hisiphp.version')}">
<link rel="stylesheet" href="__STATIC__/fonts/font-awesome/min.css?v={:config('hisiphp.version')}">
<style type="text/css">
.hs-iframe{width:100%;height:100%;}
.layui-tab{position:absolute;left:0;top:0;height:100%;width:100%;z-index:10;margin:0;border:none;overflow:hidden;}
.layui-tab-content{padding:0 0 0 10px;height:100%;}
.layui-tab-item{height:100%;}
.footer{position:fixed;left:0;bottom:0;z-index:998;}
</style>
</head>
<body class="hisi-theme-{:cookie('hisi_admin_theme')}">
{php}
$ca = strtolower(request()->controller().'/'.request()->action());
{/php}
<div class="layui-layout layui-layout-admin">
{include file="system@block/menu" /}
<div class="layui-body" id="switchBody">
<div class="layui-tab layui-tab-card" lay-filter="hisiTab" lay-allowClose="true">
<ul class="layui-tab-title">
<li lay-id="0" class="layui-this">后台首页</li>
</ul>
<div class="layui-tab-content">
<div class="layui-tab-item layui-show">
<iframe lay-id="0" src="{:url('index/welcome')}" width="100%" height="100%" frameborder="0" scrolling="yes" class="hs-iframe"></iframe>
</div>
</div>
</div>
</div>
<div class="layui-footer footer">
<span class="fl">Powered by php</span>
<span class="fr"> © 2020 All Rights Reserved.</span>
</div>
</div>
{include file="system@block/layui" /}
<script type="text/javascript">
layui.use(['jquery', 'element', 'layer'], function() {
var $ = layui.jquery, element = layui.element, layer = layui.layer;
$('.layui-tab-content').height($(window).height() - 145);
var tab = {
add: function(title, url, id) {
element.tabAdd('hisiTab', {
title: '<i class="layui-icon j-ajax" data-href="{:url('system/menu/quick')}?id='+id+'"> </i>'+title,
content: '<iframe width="100%" height="100%" lay-id="'+id+'" frameborder="0" src="'+url+'" scrolling="yes" class="x-iframe"></iframe>',
id: id
});
}, change: function(id) {
element.tabChange('hisiTab', id);
}
};
$('.admin-nav-item').click(function(event) {
var that = $(this), iframe = $('iframe[src="'+that.attr('href')+'"]');
if (iframe[0]) {
iframe.prop('src', iframe.attr('src'));
tab.change(that.attr('data-id'));
event.stopPropagation();
return false;
}
if (!that.hasClass('top-nav-item')) {
that.css({color:'#fff'});
}
tab.add(that.text(), that.attr('href'), that.attr('data-id'));
tab.change(that.attr('data-id'));
event.stopPropagation();
return false;
});
$(document).on('click', '.layui-tab-close', function() {
$('.layui-nav-child a[data-id="'+$(this).parent('li').attr('lay-id')+'"]').css({color:'rgba(255,255,255,.7)'});
});
});
</script>
</body>
</html>