Nenhuma descrição
Você não pode selecionar mais de 25 tópicos Os tópicos devem começar com uma letra ou um número, podem incluir traços ('-') e podem ter até 35 caracteres.

layout.html 9.0KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <meta charset="utf-8">
  5. <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
  6. <title>YZNCMS后台管理系统</title>
  7. <meta name="author" content="YZNCMS">
  8. <link rel="stylesheet" href="__STATIC__/libs/layui/css/layui.css">
  9. <!-- 布 局 样 式 -->
  10. <link rel="stylesheet" href="__STATIC__/admin/css/global.css?v={$Think.config.version.yzncms_release}" />
  11. <link rel="stylesheet" href="__STATIC__/common/font/iconfont.css?v={$Think.config.version.yzncms_release}">
  12. <script type="text/javascript">
  13. //全局变量
  14. var GV = {
  15. 'site':{$site|raw|json_encode}
  16. };
  17. </script>
  18. </head>
  19. <!-- 结 构 代 码 -->
  20. <body class="layui-layout-body pear-admin">
  21. <!-- 布 局 框 架 -->
  22. <div class="layui-layout layui-layout-admin">
  23. <!-- 顶 部 样 式 -->
  24. <div class="layui-header">
  25. <!-- 菜 单 顶 部 -->
  26. <div class="layui-logo">
  27. <!-- 图 标 -->
  28. <div class="logo"><i class="layui-icon layui-icon-component"></i></div>
  29. <!-- 标 题 -->
  30. <span class="title">YznCMS后台</span>
  31. </div>
  32. <!-- 顶 部 左 侧 功 能 -->
  33. <ul class="layui-nav layui-layout-left">
  34. <li class="collapse layui-nav-item"><a href="#" class="layui-icon layui-icon-shrink-right"></a></li>
  35. <li class="refresh layui-nav-item"><a href="#" class="layui-icon layui-icon-refresh-1" loading=600></a></li>
  36. </ul>
  37. <!-- 多 系 统 菜 单 -->
  38. <div id="control" class="layui-layout-control"></div>
  39. <!-- 顶 部 右 侧 菜 单 -->
  40. <ul class="layui-nav layui-layout-right">
  41. <li class="layui-nav-item layui-hide-xs"><a href="{$Think.ROOT_URL}" target="_blank" class="layui-icon layui-icon-website"></a></li>
  42. <!-- <li class="layui-nav-item layui-hide-xs"><a href="#" class="menuSearch layui-icon layui-icon-search"></a></li> -->
  43. <li class="layui-nav-item layui-hide-xs"><a href="#" class="fullScreen layui-icon layui-icon-screen-full"></a></li>
  44. <li class="layui-nav-item"><a href="javascript:;"><i class="iconfont icon-trash" title="清空缓存"></i></a>
  45. <dl class="layui-nav-child" id="deletecache">
  46. <dd><a href="javascript:;" data-type="all">一键清理缓存<span class="layui-badge-dot"></span></a></dd>
  47. <hr>
  48. <dd><a href="javascript:;" data-type="data">清理数据缓存</a></dd>
  49. <dd><a href="javascript:;" data-type="template">清理模板缓存</a></dd>
  50. <dd><a href="javascript:;" data-type="addons">清理插件缓存</a></dd>
  51. </dl>
  52. </li>
  53. <li class="layui-nav-item user">
  54. <!-- 头 像 -->
  55. <a href="javascript:;"><img src="__STATIC__/admin/img/avatar.png" class="layui-nav-img userAvatar" width="35" height="35">{$userInfo.username}</a>
  56. <!-- 功 能 菜 单 -->
  57. <dl class="layui-nav-child">
  58. <dd><a user-menu-url="{:url('general.profile/index')}" user-menu-id="3" user-menu-title="个人资料"><i class="iconfont icon-user-line"></i>&nbsp;个人资料</a></dd>
  59. <dd><a href="javascript:void(0);" class="logout"><i class="iconfont icon-logout-box-r-line"></i>&nbsp;注销登录</a></dd>
  60. </dl>
  61. </li>
  62. <!-- 主 题 配 置 -->
  63. <li class="layui-nav-item setting"><a href="#" class="layui-icon layui-icon-more-vertical"></a></li>
  64. </ul>
  65. </div>
  66. <!-- 侧 边 区 域 -->
  67. <div class="layui-side layui-bg-black">
  68. <!-- 菜 单 顶 部 -->
  69. <div class="layui-logo">
  70. <!-- 图 标 -->
  71. <div class="logo"><i class="layui-icon layui-icon-component"></i></div>
  72. <!-- 标 题 -->
  73. <span class="title">YznCMS后台</span>
  74. </div>
  75. <!-- 菜 单 内 容 -->
  76. <div class="layui-side-scroll">
  77. <div class="sider-search menuSearch">
  78. <div class="search-input">
  79. <span class="search-text">搜索菜单</span>
  80. <div class="search-icon"><i class="layui-icon layui-icon-search"></i></div>
  81. </div>
  82. </div>
  83. <div id="sideMenu"></div>
  84. </div>
  85. </div>
  86. <!-- 视 图 页 面 -->
  87. <div class="layui-body">
  88. <!-- 内 容 页 面 -->
  89. <div id="content"></div>
  90. </div>
  91. <!-- 页脚 -->
  92. <div class="layui-footer layui-text">
  93. <span class="left">
  94. <strong>Copyright © 2017-{:date("Y")}&nbsp;<a href="https://www.yzncms.com/">YznCMS</a>.</strong>&nbsp;All rights reserved.
  95. </span>
  96. <span class="center"></span>
  97. <span class="right">
  98. <b>Version</b>&nbsp;{$Think.config.version.yzncms_version}
  99. </span>
  100. </div>
  101. <!-- 遮 盖 层 -->
  102. <div class="pear-cover"></div>
  103. <!-- 加 载 动 画 -->
  104. <div class="loader-main">
  105. <!-- 动 画 对 象 -->
  106. <div class="loader"></div>
  107. </div>
  108. </div>
  109. <!-- 移 动 端 便 捷 操 作 -->
  110. <div class="pear-collapsed-pe collapse">
  111. <a href="#" class="layui-icon layui-icon-shrink-right"></a>
  112. </div>
  113. <!-- 依 赖 脚 本 -->
  114. <script src="__STATIC__/libs/layui/layui.js"></script>
  115. <script type="text/javascript">
  116. layui.config({
  117. base: '__STATIC__/libs/layui_exts/'
  118. }).extend({
  119. admin: "pear/admin", // 框架布局组件
  120. tab: "pear/tab", // 多选项卡组件
  121. menu: "pear/menu", // 数据菜单组件
  122. frame: "pear/frame", // 内容页面组件
  123. theme: "pear/theme", // 主题转换
  124. fullscreen:"pear/fullscreen", // 全屏组件
  125. }).use(['layer', 'theme'], function () {
  126. layui.theme.changeTheme(window, false);
  127. })
  128. layui.use(['admin'], function() {
  129. var admin = layui.admin;
  130. var $ = layui.jquery;
  131. admin.render({
  132. "menu": {
  133. "data": "{:url('index')}",
  134. "method": "POST",
  135. "accordion": true,
  136. "collapse": false,
  137. "control": false,//菜单模式 false 为常规菜单,true 为多系统菜单
  138. "select": 0,
  139. "async": true
  140. },
  141. "tab": {
  142. "enable": true,
  143. "keepState": true,
  144. "session": true,
  145. "preload": true,
  146. "max": "10",
  147. "index": {
  148. "id": 0,
  149. "href":"{:url('main/index')}",
  150. "title": "首页"
  151. }
  152. },
  153. "theme": {
  154. "defaultColor": "2",
  155. "defaultMenu": "dark-theme",
  156. "defaultHeader": "light-theme",
  157. "allowCustom": true,
  158. "banner": false
  159. },
  160. "colors": [
  161. {"id": "1", "color": "#2d8cf0", "second": "#ecf5ff"},
  162. {"id": "2", "color": "#36b368", "second": "#f0f9eb"},
  163. {"id": "3", "color": "#f6ad55", "second": "#fdf6ec"},
  164. {"id": "4", "color": "#f56c6c", "second": "#fef0f0"},
  165. {"id": "5", "color": "#3963bc", "second": "#ecf5ff"}
  166. ],
  167. "other": {
  168. "keepLoad": "1200",
  169. "autoHead": false,
  170. "footer": false
  171. }
  172. });
  173. // 登出逻辑
  174. admin.logout(function(){
  175. location.href = "{:url('admin/index/logout')}";
  176. // 注销逻辑 返回 true / false
  177. return true;
  178. })
  179. //清除缓存
  180. $('body').on('click', "dl#deletecache dd a", function() {
  181. $.ajax({
  182. url: "{:url('admin/index/cache')}",
  183. dataType: 'json',
  184. data: { type: $(this).data("type") },
  185. cache: false,
  186. success: function(res) {
  187. if (res.code == 1) {
  188. var index = layer.msg('清除缓存中,请稍候', { icon: 16, time: false, shade: 0.8 });
  189. setTimeout(function() {
  190. layer.close(index);
  191. layer.msg("缓存清除成功!");
  192. }, 1000);
  193. }else{
  194. layer.msg('清除缓存失败');
  195. }
  196. },
  197. error: function() {
  198. layer.msg('清除缓存失败');
  199. }
  200. });
  201. });
  202. })
  203. </script>
  204. </body>
  205. </html>