123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212 |
- <!DOCTYPE html>
- <html>
-
- <head>
- <meta charset="utf-8">
- <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
- <title>YZNCMS后台管理系统</title>
- <meta name="author" content="YZNCMS">
- <link rel="stylesheet" href="__STATIC__/libs/layui/css/layui.css">
- <!-- 布 局 样 式 -->
- <link rel="stylesheet" href="__STATIC__/admin/css/global.css?v={$Think.config.version.yzncms_release}" />
- <link rel="stylesheet" href="__STATIC__/common/font/iconfont.css?v={$Think.config.version.yzncms_release}">
- <script type="text/javascript">
- //全局变量
- var GV = {
- 'site':{$site|raw|json_encode}
- };
- </script>
- </head>
- <!-- 结 构 代 码 -->
- <body class="layui-layout-body pear-admin">
- <!-- 布 局 框 架 -->
- <div class="layui-layout layui-layout-admin">
- <!-- 顶 部 样 式 -->
- <div class="layui-header">
- <!-- 菜 单 顶 部 -->
- <div class="layui-logo">
- <!-- 图 标 -->
- <div class="logo"><i class="layui-icon layui-icon-component"></i></div>
- <!-- 标 题 -->
- <span class="title">YznCMS后台</span>
- </div>
- <!-- 顶 部 左 侧 功 能 -->
- <ul class="layui-nav layui-layout-left">
- <li class="collapse layui-nav-item"><a href="#" class="layui-icon layui-icon-shrink-right"></a></li>
- <li class="refresh layui-nav-item"><a href="#" class="layui-icon layui-icon-refresh-1" loading=600></a></li>
- </ul>
- <!-- 多 系 统 菜 单 -->
- <div id="control" class="layui-layout-control"></div>
- <!-- 顶 部 右 侧 菜 单 -->
- <ul class="layui-nav layui-layout-right">
- <li class="layui-nav-item layui-hide-xs"><a href="{$Think.ROOT_URL}" target="_blank" class="layui-icon layui-icon-website"></a></li>
- <!-- <li class="layui-nav-item layui-hide-xs"><a href="#" class="menuSearch layui-icon layui-icon-search"></a></li> -->
- <li class="layui-nav-item layui-hide-xs"><a href="#" class="fullScreen layui-icon layui-icon-screen-full"></a></li>
- <li class="layui-nav-item"><a href="javascript:;"><i class="iconfont icon-trash" title="清空缓存"></i></a>
- <dl class="layui-nav-child" id="deletecache">
- <dd><a href="javascript:;" data-type="all">一键清理缓存<span class="layui-badge-dot"></span></a></dd>
- <hr>
- <dd><a href="javascript:;" data-type="data">清理数据缓存</a></dd>
- <dd><a href="javascript:;" data-type="template">清理模板缓存</a></dd>
- <dd><a href="javascript:;" data-type="addons">清理插件缓存</a></dd>
- </dl>
- </li>
- <li class="layui-nav-item user">
- <!-- 头 像 -->
- <a href="javascript:;"><img src="__STATIC__/admin/img/avatar.png" class="layui-nav-img userAvatar" width="35" height="35">{$userInfo.username}</a>
- <!-- 功 能 菜 单 -->
- <dl class="layui-nav-child">
- <dd><a user-menu-url="{:url('general.profile/index')}" user-menu-id="3" user-menu-title="个人资料"><i class="iconfont icon-user-line"></i> 个人资料</a></dd>
- <dd><a href="javascript:void(0);" class="logout"><i class="iconfont icon-logout-box-r-line"></i> 注销登录</a></dd>
- </dl>
- </li>
- <!-- 主 题 配 置 -->
- <li class="layui-nav-item setting"><a href="#" class="layui-icon layui-icon-more-vertical"></a></li>
- </ul>
- </div>
- <!-- 侧 边 区 域 -->
- <div class="layui-side layui-bg-black">
- <!-- 菜 单 顶 部 -->
- <div class="layui-logo">
- <!-- 图 标 -->
- <div class="logo"><i class="layui-icon layui-icon-component"></i></div>
- <!-- 标 题 -->
- <span class="title">YznCMS后台</span>
- </div>
- <!-- 菜 单 内 容 -->
- <div class="layui-side-scroll">
- <div class="sider-search menuSearch">
- <div class="search-input">
- <span class="search-text">搜索菜单</span>
- <div class="search-icon"><i class="layui-icon layui-icon-search"></i></div>
- </div>
- </div>
- <div id="sideMenu"></div>
- </div>
- </div>
- <!-- 视 图 页 面 -->
- <div class="layui-body">
- <!-- 内 容 页 面 -->
- <div id="content"></div>
- </div>
- <!-- 页脚 -->
- <div class="layui-footer layui-text">
- <span class="left">
- <strong>Copyright © 2017-{:date("Y")} <a href="https://www.yzncms.com/">YznCMS</a>.</strong> All rights reserved.
-
- </span>
- <span class="center"></span>
- <span class="right">
- <b>Version</b> {$Think.config.version.yzncms_version}
- </span>
- </div>
- <!-- 遮 盖 层 -->
- <div class="pear-cover"></div>
- <!-- 加 载 动 画 -->
- <div class="loader-main">
- <!-- 动 画 对 象 -->
- <div class="loader"></div>
- </div>
- </div>
- <!-- 移 动 端 便 捷 操 作 -->
- <div class="pear-collapsed-pe collapse">
- <a href="#" class="layui-icon layui-icon-shrink-right"></a>
- </div>
- <!-- 依 赖 脚 本 -->
- <script src="__STATIC__/libs/layui/layui.js"></script>
- <script type="text/javascript">
- layui.config({
- base: '__STATIC__/libs/layui_exts/'
- }).extend({
- admin: "pear/admin", // 框架布局组件
- tab: "pear/tab", // 多选项卡组件
- menu: "pear/menu", // 数据菜单组件
- frame: "pear/frame", // 内容页面组件
- theme: "pear/theme", // 主题转换
- fullscreen:"pear/fullscreen", // 全屏组件
- }).use(['layer', 'theme'], function () {
- layui.theme.changeTheme(window, false);
- })
-
- layui.use(['admin'], function() {
- var admin = layui.admin;
- var $ = layui.jquery;
-
- admin.render({
- "menu": {
- "data": "{:url('index')}",
- "method": "POST",
- "accordion": true,
- "collapse": false,
- "control": false,//菜单模式 false 为常规菜单,true 为多系统菜单
- "select": 0,
- "async": true
- },
- "tab": {
- "enable": true,
- "keepState": true,
- "session": true,
- "preload": true,
- "max": "10",
- "index": {
- "id": 0,
- "href":"{:url('main/index')}",
- "title": "首页"
- }
- },
- "theme": {
- "defaultColor": "2",
- "defaultMenu": "dark-theme",
- "defaultHeader": "light-theme",
- "allowCustom": true,
- "banner": false
- },
- "colors": [
- {"id": "1", "color": "#2d8cf0", "second": "#ecf5ff"},
- {"id": "2", "color": "#36b368", "second": "#f0f9eb"},
- {"id": "3", "color": "#f6ad55", "second": "#fdf6ec"},
- {"id": "4", "color": "#f56c6c", "second": "#fef0f0"},
- {"id": "5", "color": "#3963bc", "second": "#ecf5ff"}
- ],
- "other": {
- "keepLoad": "1200",
- "autoHead": false,
- "footer": false
- }
- });
-
- // 登出逻辑
- admin.logout(function(){
- location.href = "{:url('admin/index/logout')}";
- // 注销逻辑 返回 true / false
- return true;
- })
-
- //清除缓存
- $('body').on('click', "dl#deletecache dd a", function() {
- $.ajax({
- url: "{:url('admin/index/cache')}",
- dataType: 'json',
- data: { type: $(this).data("type") },
- cache: false,
- success: function(res) {
- if (res.code == 1) {
- var index = layer.msg('清除缓存中,请稍候', { icon: 16, time: false, shade: 0.8 });
- setTimeout(function() {
- layer.close(index);
- layer.msg("缓存清除成功!");
- }, 1000);
- }else{
- layer.msg('清除缓存失败');
- }
- },
- error: function() {
- layer.msg('清除缓存失败');
- }
- });
- });
- })
- </script>
- </body>
-
- </html>
|