top.html 1.3 KB

1234567891011121314151617181920212223242526
  1. <div class="layui-header header header-demo">
  2. <div class="layui-main">
  3. <a class="logo" href="/">
  4. {{data['setting']['name']}}
  5. </a>
  6. <ul class="layui-nav" lay-filter="">
  7. <li class="layui-nav-item">
  8. <a href="javascript:;" id="top-show" style="display: none;">{{data['setting']['name']}}</a>
  9. <dl class="layui-nav-child"> <!-- 二级菜单 -->
  10. {% for value in data['setting']['farmList'] %}
  11. {% if 'top' in data['setting']['roleInfo'] and (data['setting']['roleInfo']['top'] and str(value['id']) + ',' in data['setting']['roleInfo']['top'] + ',') or data['setting']['adminInfo']['id'] == 1 %}
  12. <dd><a href="javascript:;" onclick="setFarm($(this), {{value['id']}})" {% if int(value['id']) == int(data['setting']['farm']) %}class="top-hide" style="display:none;"{% end %}>{{value['name']}}</a></dd>
  13. {% end %}
  14. {% end %}
  15. </dl>
  16. </li>
  17. <li class="layui-nav-item">
  18. <a href="javascript:;">{{data['setting']['adminInfo']['username']}}</a>
  19. <dl class="layui-nav-child"> <!-- 二级菜单 -->
  20. <dd><a href="/user/loginout">退出</a></dd>
  21. </dl>
  22. </li>
  23. <li class="layui-nav-item x-index"><a href="{{data['setting']['web']}}" target="_blank">前台首页</a></li>
  24. </ul>
  25. </div>
  26. </div>