index.html 7.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153
  1. <!DOCTYPE html>
  2. <html lang="zh">
  3. <head>
  4. <title>{block name="title"}{$title|default=''}{if !empty($title)} · {/if}{:sysconf('site_name')}{/block}</title>
  5. <meta charset="utf-8">
  6. <meta name="renderer" content="webkit">
  7. <meta name="format-detection" content="telephone=no">
  8. <meta name="apple-mobile-web-app-capable" content="yes">
  9. <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
  10. <meta name="apple-mobile-web-app-status-bar-style" content="black">
  11. <meta name="viewport" content="width=device-width,initial-scale=1,maximum-scale=0.4">
  12. <link rel="shortcut icon" href="{:sysconf('site_icon')}">
  13. <link rel="stylesheet" href="__ROOT__/static/plugs/awesome/fonts.css?at={:date('md')}">
  14. <link rel="stylesheet" href="__ROOT__/static/plugs/layui/css/layui.css?at={:date('md')}">
  15. <link rel="stylesheet" href="__ROOT__/static/theme/css/console.css?at={:date('md')}">
  16. {block name="style"}{/block}
  17. <script>window.ROOT_URL = '__ROOT__';</script>
  18. <script src="__ROOT__/static/plugs/jquery/pace.min.js"></script>
  19. <style>
  20. .layui-header .layui-layout-right li a{
  21. padding-right: 35px;
  22. }
  23. .tangram-suggestion-main{
  24. z-index: 999;
  25. }
  26. </style>
  27. <script src="//api.map.baidu.com/api?type=webgl&v=1.0&ak=E4Y9cdBjAvDM6DjGcOmBA4v2GcEXAWvG"></script>
  28. </head>
  29. <body class="layui-layout-body">
  30. {block name='body'}
  31. <div class="layui-layout layui-layout-admin layui-layout-left-hide">
  32. <!-- 顶部菜单 开始 -->
  33. <div class="layui-header notselect">
  34. <a href="{:url('@')}" class="layui-logo layui-elip">
  35. {:sysconf('app_name')} {if sysconf('app_version')}<sup class="padding-left-5">{:sysconf('app_version')}</sup>{/if}
  36. </a>
  37. <ul class="layui-nav layui-layout-left">
  38. <li class="layui-nav-item" lay-unselect>
  39. <a class="text-center" data-target-menu-type>
  40. <i class="layui-icon layui-icon-spread-left"></i>
  41. </a>
  42. </li>
  43. {foreach $menus as $oneMenu}
  44. <li class="layui-nav-item">
  45. <a data-menu-node="m-{$oneMenu.id}" data-open="{$oneMenu.url}">
  46. {notempty name='oneMenu.icon'}<span class='{$oneMenu.icon} padding-right-5'></span>{/notempty}
  47. <span>{$oneMenu.title|default=''}</span>
  48. </a>
  49. </li>
  50. {/foreach}
  51. </ul>
  52. <ul class="layui-nav layui-layout-right">
  53. <li lay-unselect class="layui-nav-item"><a data-reload><i class="layui-icon layui-icon-refresh-3"></i></a></li>
  54. {notempty name='Think.session.user.username'}
  55. <li class="layui-nav-item">
  56. <dl class="layui-nav-child">
  57. <dd lay-unselect><a data-modal="{:url('admin/index/info',['id'=>session('user.id')])}"><i class="layui-icon layui-icon-set-fill margin-right-5"></i>基本资料</a></dd>
  58. <dd lay-unselect><a data-modal="{:url('admin/index/pass',['id'=>session('user.id')])}"><i class="layui-icon layui-icon-component margin-right-5"></i>安全设置</a></dd>
  59. {if auth('admin/index/clearruntime')}
  60. <dd lay-unselect><a data-modal="{:url('admin/index/clearRuntime')}"><i class="layui-icon layui-icon-fonts-clear margin-right-5"></i>清理缓存</a></dd>
  61. {/if}
  62. {notempty name='GLOBALS.AdminUserRightOption'}{foreach $GLOBALS.AdminUserRightOption as $option}{if auth($option.node)}
  63. <dd lay-unselect><a data-{$option.type}="{$option.action}"><i class="{$option.icon} margin-right-5"></i>{$option.title}</a></dd>
  64. {/if}{/foreach}{/notempty}
  65. <dd lay-unselect><a data-confirm="确定要退出登录吗?" data-load="{:url('admin/login/out')}"><i class="layui-icon layui-icon-release margin-right-5"></i>退出登录</a></dd>
  66. </dl>
  67. <a><span><i class="layui-icon layui-icon-username margin-right-5"></i> {:session('user.username')}</span></a>
  68. </li>
  69. {else}
  70. <li class="layui-nav-item">
  71. <a data-href="{:url('@admin/login')}"><i class="layui-icon layui-icon-username"></i> 立即登录</a>
  72. </li>
  73. {/notempty}
  74. </ul>
  75. </div>
  76. <!-- 顶部菜单 结束 -->
  77. <!-- 左则菜单 开始 -->
  78. <div class="layui-side layui-bg-black notselect">
  79. <div class="layui-side-scroll">
  80. {foreach $menus as $oneMenu}
  81. {notempty name='oneMenu.sub'}
  82. <ul class="layui-nav layui-nav-tree layui-hide" data-menu-layout="m-{$oneMenu.id}">
  83. {foreach $oneMenu.sub as $twoMenu}
  84. {empty name='twoMenu.sub'}
  85. <li class="layui-nav-item">
  86. <a data-target-tips="{$twoMenu.title}" data-menu-node="m-{$oneMenu.id}-{$twoMenu.id}" data-open="{$twoMenu.url}">
  87. <span class='{$twoMenu.icon|default="layui-icon layui-icon-link"}'></span>
  88. <span class="nav-text padding-left-5">{$twoMenu.title}</span>
  89. </a>
  90. </li>
  91. {else}
  92. <li class="layui-nav-item" data-submenu-layout='m-{$oneMenu.id}-{$twoMenu.id}'>
  93. <a data-target-tips="{$twoMenu.title}" style="background:#393D49">
  94. <span class='nav-icon layui-hide {$twoMenu.icon|default="layui-icon layui-icon-triangle-d"}'></span>
  95. <span class="nav-text padding-left-5">{$twoMenu.title}</span>
  96. </a>
  97. <dl class="layui-nav-child">
  98. {foreach $twoMenu.sub as $thrMenu}
  99. {if ($thrMenu.url == "/operate/forum/index.html" && $forum == 1)
  100. || ($thrMenu.url == "/nutrition/user_datum/index.html" && $datum == 1)
  101. || ($thrMenu.url == "/nutrition/user_article/index.html" && $article == 1)
  102. || ($thrMenu.url == "/nutrition/user_video/index.html" && $video == 1)}
  103. <dd onclick="myFunction('{$thrMenu.url}')">
  104. {else}
  105. <dd>
  106. {/if}
  107. <a data-target-tips="{$thrMenu.title}" data-open="{$thrMenu.url}" data-menu-node="m-{$oneMenu.id}-{$twoMenu.id}-{$thrMenu.id}">
  108. <span class='nav-icon padding-left-5 {$thrMenu.icon|default="layui-icon layui-icon-link"}'></span>
  109. <span class="nav-text padding-left-5">{$thrMenu.title}
  110. {if ($thrMenu.url == "/operate/forum/index.html" && $forum == 1)
  111. || ($thrMenu.url == "/nutrition/user_datum/index.html" && $datum == 1)
  112. || ($thrMenu.url == "/nutrition/user_article/index.html" && $article == 1)
  113. || ($thrMenu.url == "/nutrition/user_video/index.html" && $video == 1)} <span class="nav-text padding-left-5" id="{$thrMenu.url}"> • </span> {/if}
  114. </span>
  115. </a>
  116. </dd>
  117. {/foreach}
  118. </dl>
  119. </li>
  120. {/empty}
  121. {/foreach}
  122. </ul>
  123. {/notempty}
  124. {/foreach}
  125. </div>
  126. </div>
  127. <!-- 左则菜单 结束 -->
  128. <!-- 主体内容 开始 -->
  129. <div class="layui-body layui-bg-gray">{block name='content'}{/block}</div>
  130. <!-- 主体内容 结束 -->
  131. </div>
  132. {/block}
  133. <script src="__ROOT__/static/plugs/layui/layui.all.js"></script>
  134. <script src="__ROOT__/static/plugs/require/require.js"></script>
  135. <script src="__ROOT__/static/admin.js"></script>
  136. <script>
  137. function myFunction(url) {
  138. console.log(url);
  139. var button = document.getElementById(url); // 获取按钮元素
  140. button.style.display = 'none';
  141. }
  142. </script>
  143. {block name='script'}{/block}
  144. </body>
  145. </html>