nav.html 4.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114
  1. <div id="load_style" style="display:none;">
  2. </div>
  3. <style>
  4. @media screen and (max-width: 1024px) {
  5. .nav{
  6. display: none;
  7. }
  8. }
  9. </style>
  10. <div id="dever-name" style="display:none;"></div>
  11. <div class="layui-header" id="nav">
  12. <!-- 头部区域 -->
  13. <ul class="layui-nav layui-layout-left" id="top">
  14. <li class="layui-nav-item layadmin-flexible" lay-unselect>
  15. <a href="javascript:;" layadmin-event="flexible" title="侧边伸缩">
  16. <i class="layui-icon layui-icon-shrink-right" id="LAY_app_flexible"></i>
  17. </a>
  18. </li><li class="layui-nav-item" lay-unselect>
  19. <a href="javascript:;" layadmin-event="back" title="上一页">
  20. <i class="layui-icon layui-icon-return"></i>
  21. </a>
  22. </li><li class="layui-nav-item" lay-unselect>
  23. <a href="javascript:;" layadmin-event="refresh" title="刷新">
  24. <i class="layui-icon layui-icon-refresh-3"></i>
  25. </a>
  26. </li>
  27. </ul>
  28. <ul class="layui-nav layui-layout-right" lay-filter="layadmin-layout-right">
  29. <li class="layui-nav-item auth-top" lay-unselect style="display:none;">
  30. <a href="javascript:;">
  31. <cite><span></span></cite>
  32. </a>
  33. <ul class="layui-nav-child">
  34. <li><a lay-href="set/user/info.html">基本资料</a></li>
  35. </ul>
  36. </li>
  37. <li class="layui-nav-item" lay-unselect style="display:none;">
  38. <a lay-href="app/message/index.html" layadmin-event="message" lay-text="消息中心">
  39. <i class="layui-icon layui-icon-notice"></i>
  40. <!-- 如果有新消息,则显示小圆点 -->
  41. <span class="layui-badge-dot"></span>
  42. </a>
  43. </li>
  44. <li class="layui-nav-item layui-hide-xs" lay-unselect>
  45. <a href="javascript:;" layadmin-event="theme">
  46. <i class="layui-icon layui-icon-theme"></i>
  47. </a>
  48. </li>
  49. <li class="layui-nav-item layui-hide-xs" lay-unselect style="display:none;">
  50. <a href="javascript:;" layadmin-event="note">
  51. <i class="layui-icon layui-icon-note"></i>
  52. </a>
  53. </li>
  54. <li class="layui-nav-item layui-hide-xs" lay-unselect style="display:none;">
  55. <a href="javascript:;" layadmin-event="fullscreen">
  56. <i class="layui-icon layui-icon-screen-full"></i>
  57. </a>
  58. </li>
  59. <li class="layui-nav-item" lay-unselect>
  60. <a href="javascript:;">
  61. <cite id="manage-name"></cite>
  62. </a>
  63. <dl class="layui-nav-child">
  64. <dd><a id="edit_password" onclick="pass($(this));" style="cursor: pointer;display: none;">修改密码</a></dd>
  65. <dd><a id="edit_user" href="javascript:;" onclick="editUser($(this));" style="cursor: pointer;">修改资料</a></dd>
  66. <hr>
  67. <dd style="text-align: center;"><a id="logout-url" href="javascript:;">退出</a></dd>
  68. </dl>
  69. </li>
  70. <li class="layui-nav-item layui-hide-xs" lay-unselect style="display:none;">
  71. <a href="javascript:;" layadmin-event="about"><i class="layui-icon layui-icon-more-vertical"></i></a>
  72. </li>
  73. <li class="layui-nav-item layui-show-xs-inline-block layui-hide-sm" lay-unselect>
  74. <a href="javascript:;" layadmin-event="more"><i class="layui-icon layui-icon-more-vertical"></i></a>
  75. </li>
  76. </ul>
  77. </div>
  78. <script>
  79. function editUser(e)
  80. {
  81. var name = e.attr('data-name');
  82. var mobile = e.attr('data-mobile');
  83. var html = '<style>.password_edit div{margin:10px;}.password_edit input{width:200px;}</style><div class="password_edit">';
  84. html += '<div><label class="layui-form-label">姓名:</label><input type="text" class="form-control form_margin layui-input" id="edit_name" value="'+name+'"/></div>';
  85. html += '<div><label class="layui-form-label">手机号:</label><input type="text" class="form-control form_margin layui-input" id="edit_mobile" value="'+mobile+'"/></div>';
  86. html += '</div>';
  87. var edit = function()
  88. {
  89. var edit_name = $("#edit_name").val();
  90. var edit_mobile = $("#edit_mobile").val();
  91. if(!edit_name || !edit_mobile)
  92. {
  93. layer.msg('请输入姓名或者手机号');
  94. return;
  95. }
  96. $.getJSON(config.host + 'admin/auth.edit?json=1', {name:edit_name,mobile:edit_mobile}, function(t)
  97. {
  98. msg(t);
  99. })
  100. };
  101. console.info(html);
  102. showAlert(html, edit, '修改资料');
  103. }
  104. </script>