综述: 添加平台端web基础布局文件和playwright测试目录
This commit is contained in:
		
							parent
							
								
									ea49d44b68
								
							
						
					
					
						commit
						a5cc68b228
					
				
										
											Binary file not shown.
										
									
								
							| After Width: | Height: | Size: 266 KiB | 
|  | @ -0,0 +1,783 @@ | |||
| <!DOCTYPE html> | ||||
| <html lang="zh-CN"> | ||||
| <head> | ||||
|     <meta charset="UTF-8"> | ||||
|     <meta name="viewport" content="width=device-width, initial-scale=1.0"> | ||||
|     <title>管理后台</title> | ||||
|     <style> | ||||
|         * { | ||||
|             margin: 0; | ||||
|             padding: 0; | ||||
|             box-sizing: border-box; | ||||
|         } | ||||
| 
 | ||||
|         body { | ||||
|             font-family: "Helvetica Neue", Helvetica, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", Arial, sans-serif; | ||||
|             font-size: 16px; | ||||
|             height: 100vh; | ||||
|             overflow: hidden; | ||||
|         } | ||||
| 
 | ||||
|         .admin-layout { | ||||
|             display: flex; | ||||
|             height: 100vh; | ||||
|         } | ||||
| 
 | ||||
|         /* 左侧菜单栏 */ | ||||
|         .sidebar { | ||||
|             width: 210px; | ||||
|             background-color: rgb(48, 65, 86); | ||||
|             position: relative; | ||||
|             overflow-y: auto; | ||||
|             flex-shrink: 0; | ||||
|         } | ||||
| 
 | ||||
|         .menu-list { | ||||
|             list-style: none; | ||||
|             padding: 0; | ||||
|             margin: 0; | ||||
|         } | ||||
| 
 | ||||
|         .menu-item { | ||||
|             position: relative; | ||||
|         } | ||||
| 
 | ||||
|         .menu-item-link { | ||||
|             display: flex; | ||||
|             align-items: center; | ||||
|             padding: 15px 20px; | ||||
|             color: rgba(255, 255, 255, 0.85); | ||||
|             text-decoration: none; | ||||
|             font-size: 14px; | ||||
|             cursor: pointer; | ||||
|             transition: all 0.2s; | ||||
|             border: none; | ||||
|             background: none; | ||||
|             width: 100%; | ||||
|         } | ||||
| 
 | ||||
|         .menu-item-link:hover { | ||||
|             background-color: rgba(255, 255, 255, 0.1); | ||||
|             color: #fff; | ||||
|         } | ||||
| 
 | ||||
|         .menu-item-link.active { | ||||
|             background-color: #1890ff; | ||||
|             color: #fff; | ||||
|         } | ||||
| 
 | ||||
|         .menu-icon { | ||||
|             width: 16px; | ||||
|             height: 16px; | ||||
|             margin-right: 12px; | ||||
|             flex-shrink: 0; | ||||
|             display: inline-block; | ||||
|         } | ||||
| 
 | ||||
|         .menu-icon svg { | ||||
|             width: 100%; | ||||
|             height: 100%; | ||||
|             fill: rgba(255, 255, 255, 0.7); | ||||
|         } | ||||
| 
 | ||||
|         .menu-text { | ||||
|             flex: 1; | ||||
|         } | ||||
| 
 | ||||
|         .menu-arrow { | ||||
|             width: 12px; | ||||
|             height: 12px; | ||||
|             transition: transform 0.2s; | ||||
|         } | ||||
| 
 | ||||
|         .menu-arrow svg { | ||||
|             width: 100%; | ||||
|             height: 100%; | ||||
|             fill: rgba(255, 255, 255, 0.6); | ||||
|         } | ||||
| 
 | ||||
|         .menu-item.expanded .menu-arrow { | ||||
|             transform: rotate(180deg); | ||||
|         } | ||||
| 
 | ||||
|         /* 子菜单 */ | ||||
|         .submenu { | ||||
|             background-color: rgba(0, 0, 0, 0.1); | ||||
|             display: none; | ||||
|             padding-left: 48px; | ||||
|         } | ||||
| 
 | ||||
|         .menu-item.expanded .submenu { | ||||
|             display: block; | ||||
|         } | ||||
| 
 | ||||
|         .submenu-item { | ||||
|             display: block; | ||||
|             padding: 12px 20px; | ||||
|             color: rgba(255, 255, 255, 0.7); | ||||
|             text-decoration: none; | ||||
|             font-size: 13px; | ||||
|             cursor: pointer; | ||||
|             transition: all 0.2s; | ||||
|         } | ||||
| 
 | ||||
|         .submenu-item:hover { | ||||
|             background-color: rgba(255, 255, 255, 0.1); | ||||
|             color: #fff; | ||||
|         } | ||||
| 
 | ||||
|         .submenu-item.active { | ||||
|             background-color: #1890ff; | ||||
|             color: #fff; | ||||
|         } | ||||
| 
 | ||||
|         /* 右侧主内容区 */ | ||||
|         .main-content { | ||||
|             flex: 1; | ||||
|             display: flex; | ||||
|             flex-direction: column; | ||||
|             overflow: hidden; | ||||
|         } | ||||
| 
 | ||||
|         /* 顶部导航栏 */ | ||||
|         .header { | ||||
|             height: 64px; | ||||
|             background: #fff; | ||||
|             border-bottom: 1px solid #e8e8e8; | ||||
|             display: flex; | ||||
|             align-items: center; | ||||
|             justify-content: space-between; | ||||
|             padding: 0 24px; | ||||
|             box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06); | ||||
|         } | ||||
| 
 | ||||
|         .header-left { | ||||
|             display: flex; | ||||
|             align-items: center; | ||||
|         } | ||||
| 
 | ||||
|         .menu-trigger { | ||||
|             width: 20px; | ||||
|             height: 20px; | ||||
|             cursor: pointer; | ||||
|             margin-right: 16px; | ||||
|             display: flex; | ||||
|             flex-direction: column; | ||||
|             justify-content: space-between; | ||||
|             align-items: center; | ||||
|         } | ||||
| 
 | ||||
|         .menu-trigger::before, | ||||
|         .menu-trigger::after, | ||||
|         .menu-trigger { | ||||
|             content: ''; | ||||
|             height: 2px; | ||||
|             background: #666; | ||||
|             border-radius: 1px; | ||||
|         } | ||||
| 
 | ||||
|         .menu-trigger::before, | ||||
|         .menu-trigger::after { | ||||
|             display: block; | ||||
|             width: 100%; | ||||
|         } | ||||
| 
 | ||||
|         .breadcrumb { | ||||
|             display: flex; | ||||
|             align-items: center; | ||||
|             font-size: 14px; | ||||
|             color: #666; | ||||
|         } | ||||
| 
 | ||||
|         .breadcrumb-item { | ||||
|             color: #666; | ||||
|             text-decoration: none; | ||||
|         } | ||||
| 
 | ||||
|         .breadcrumb-item:hover { | ||||
|             color: #1890ff; | ||||
|         } | ||||
| 
 | ||||
|         .breadcrumb-separator { | ||||
|             margin: 0 8px; | ||||
|             color: #ccc; | ||||
|         } | ||||
| 
 | ||||
|         .header-right { | ||||
|             display: flex; | ||||
|             align-items: center; | ||||
|         } | ||||
| 
 | ||||
|         .user-info { | ||||
|             display: flex; | ||||
|             align-items: center; | ||||
|             padding: 8px 12px; | ||||
|             border-radius: 4px; | ||||
|             cursor: pointer; | ||||
|             transition: background-color 0.2s; | ||||
|         } | ||||
| 
 | ||||
|         .user-info:hover { | ||||
|             background-color: #f5f5f5; | ||||
|         } | ||||
| 
 | ||||
|         .user-avatar { | ||||
|             width: 24px; | ||||
|             height: 24px; | ||||
|             background: #1890ff; | ||||
|             border-radius: 50%; | ||||
|             margin-right: 8px; | ||||
|             display: flex; | ||||
|             align-items: center; | ||||
|             justify-content: center; | ||||
|             color: #fff; | ||||
|             font-size: 12px; | ||||
|         } | ||||
| 
 | ||||
|         /* 标签页区域 */ | ||||
|         .tabs-container { | ||||
|             height: 48px; | ||||
|             background: #fff; | ||||
|             border-bottom: 1px solid #e8e8e8; | ||||
|             display: flex; | ||||
|             align-items: center; | ||||
|             padding: 0 16px; | ||||
|             overflow-x: auto; | ||||
|         } | ||||
| 
 | ||||
|         .tab-item { | ||||
|             display: flex; | ||||
|             align-items: center; | ||||
|             padding: 8px 16px; | ||||
|             background: #f5f5f5; | ||||
|             border: 1px solid #d9d9d9; | ||||
|             border-radius: 4px 4px 0 0; | ||||
|             margin-right: 2px; | ||||
|             cursor: pointer; | ||||
|             font-size: 13px; | ||||
|             white-space: nowrap; | ||||
|             transition: all 0.2s; | ||||
|             position: relative; | ||||
|             min-width: 120px; | ||||
|             justify-content: space-between; | ||||
|         } | ||||
| 
 | ||||
|         .tab-item.active { | ||||
|             background: #fff; | ||||
|             border-bottom-color: #fff; | ||||
|             z-index: 1; | ||||
|             margin-bottom: -1px; | ||||
|         } | ||||
| 
 | ||||
|         .tab-item:hover { | ||||
|             background: #e6f7ff; | ||||
|         } | ||||
| 
 | ||||
|         .tab-title { | ||||
|             flex: 1; | ||||
|         } | ||||
| 
 | ||||
|         .tab-close { | ||||
|             width: 16px; | ||||
|             height: 16px; | ||||
|             background: #ccc; | ||||
|             border-radius: 50%; | ||||
|             margin-left: 8px; | ||||
|             cursor: pointer; | ||||
|             display: flex; | ||||
|             align-items: center; | ||||
|             justify-content: center; | ||||
|             font-size: 12px; | ||||
|             color: #fff; | ||||
|             opacity: 0.7; | ||||
|             transition: all 0.2s; | ||||
|         } | ||||
| 
 | ||||
|         .tab-close:hover { | ||||
|             background: #ff4d4f; | ||||
|             opacity: 1; | ||||
|         } | ||||
| 
 | ||||
|         .tab-item:first-child .tab-close { | ||||
|             display: none; | ||||
|         } | ||||
| 
 | ||||
|         /* 内容区域 */ | ||||
|         .content-area { | ||||
|             flex: 1; | ||||
|             background: #f0f2f5; | ||||
|             padding: 24px; | ||||
|             overflow-y: auto; | ||||
|         } | ||||
| 
 | ||||
|         .content-container { | ||||
|             background: #fff; | ||||
|             border-radius: 6px; | ||||
|             padding: 24px; | ||||
|             min-height: 400px; | ||||
|             box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06); | ||||
|         } | ||||
| 
 | ||||
|         /* 响应式设计 */ | ||||
|         @media (max-width: 768px) { | ||||
|             .sidebar { | ||||
|                 position: fixed; | ||||
|                 left: -210px; | ||||
|                 top: 0; | ||||
|                 height: 100vh; | ||||
|                 z-index: 1000; | ||||
|                 transition: left 0.3s; | ||||
|             } | ||||
| 
 | ||||
|             .sidebar.open { | ||||
|                 left: 0; | ||||
|             } | ||||
| 
 | ||||
|             .main-content { | ||||
|                 margin-left: 0; | ||||
|             } | ||||
|         } | ||||
| 
 | ||||
|         /* 滚动条样式 */ | ||||
|         .sidebar::-webkit-scrollbar { | ||||
|             width: 6px; | ||||
|         } | ||||
| 
 | ||||
|         .sidebar::-webkit-scrollbar-track { | ||||
|             background: rgba(255, 255, 255, 0.1); | ||||
|         } | ||||
| 
 | ||||
|         .sidebar::-webkit-scrollbar-thumb { | ||||
|             background: rgba(255, 255, 255, 0.3); | ||||
|             border-radius: 3px; | ||||
|         } | ||||
| 
 | ||||
|         .sidebar::-webkit-scrollbar-thumb:hover { | ||||
|             background: rgba(255, 255, 255, 0.5); | ||||
|         } | ||||
|     </style> | ||||
| </head> | ||||
| <body> | ||||
|     <div class="admin-layout"> | ||||
|         <!-- 左侧菜单 --> | ||||
|         <aside class="sidebar"> | ||||
|             <nav role="navigation"> | ||||
|                 <ul class="menu-list"> | ||||
|                     <li class="menu-item"> | ||||
|                         <a href="#/dashboard" class="menu-item-link"> | ||||
|                             <span class="menu-icon"> | ||||
|                                 <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1024 1024"> | ||||
|                                     <path fill="currentColor" d="M160 448a32 32 0 0 1-32-32V160.064a32 32 0 0 1 32-32h256a32 32 0 0 1 32 32V416a32 32 0 0 1-32 32zm448 0a32 32 0 0 1-32-32V160.064a32 32 0 0 1 32-32h255.936a32 32 0 0 1 32 32V416a32 32 0 0 1-32 32zM160 896a32 32 0 0 1-32-32V608a32 32 0 0 1 32-32h256a32 32 0 0 1 32 32v256a32 32 0 0 1-32 32zm448 0a32 32 0 0 1-32-32V608a32 32 0 0 1 32-32h255.936a32 32 0 0 1 32 32v256a32 32 0 0 1-32 32z"></path> | ||||
|                                 </svg> | ||||
|                             </span> | ||||
|                             <span class="menu-text">首页</span> | ||||
|                         </a> | ||||
|                     </li> | ||||
|                     <li class="menu-item"> | ||||
|                         <button class="menu-item-link" onclick="toggleSubmenu(this)"> | ||||
|                             <span class="menu-icon"> | ||||
|                                 <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1024 1024"> | ||||
|                                     <path fill="currentColor" d="M160 448a32 32 0 0 1-32-32V160.064a32 32 0 0 1 32-32h256a32 32 0 0 1 32 32V416a32 32 0 0 1-32 32zm448 0a32 32 0 0 1-32-32V160.064a32 32 0 0 1 32-32h255.936a32 32 0 0 1 32 32V416a32 32 0 0 1-32 32zM160 896a32 32 0 0 1-32-32V608a32 32 0 0 1 32-32h256a32 32 0 0 1 32 32v256a32 32 0 0 1-32 32zm448 0a32 32 0 0 1-32-32V608a32 32 0 0 1 32-32h255.936a32 32 0 0 1 32 32v256a32 32 0 0 1-32 32z"></path> | ||||
|                                 </svg> | ||||
|                             </span> | ||||
|                             <span class="menu-text">数据中心</span> | ||||
|                             <span class="menu-arrow"> | ||||
|                                 <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1024 1024"> | ||||
|                                     <path fill="currentColor" d="M831.872 340.864 512 652.672 192.128 340.864a30.592 30.592 0 0 0-42.752 0 29.12 29.12 0 0 0 0 41.6L489.664 714.24a32 32 0 0 0 44.672 0l340.288-331.712a29.12 29.12 0 0 0 0-41.728 30.592 30.592 0 0 0-42.752 0z"></path> | ||||
|                                 </svg> | ||||
|                             </span> | ||||
|                         </button> | ||||
|                     </li> | ||||
|                     <li class="menu-item"> | ||||
|                         <button class="menu-item-link" onclick="toggleSubmenu(this)"> | ||||
|                             <span class="menu-icon"> | ||||
|                                 <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1024 1024"> | ||||
|                                     <path fill="currentColor" d="M160 448a32 32 0 0 1-32-32V160.064a32 32 0 0 1 32-32h256a32 32 0 0 1 32 32V416a32 32 0 0 1-32 32zm448 0a32 32 0 0 1-32-32V160.064a32 32 0 0 1 32-32h255.936a32 32 0 0 1 32 32V416a32 32 0 0 1-32 32zM160 896a32 32 0 0 1-32-32V608a32 32 0 0 1 32-32h256a32 32 0 0 1 32 32v256a32 32 0 0 1-32 32zm448 0a32 32 0 0 1-32-32V608a32 32 0 0 1 32-32h255.936a32 32 0 0 1 32 32v256a32 32 0 0 1-32 32z"></path> | ||||
|                                 </svg> | ||||
|                             </span> | ||||
|                             <span class="menu-text">运营管理</span> | ||||
|                             <span class="menu-arrow"> | ||||
|                                 <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1024 1024"> | ||||
|                                     <path fill="currentColor" d="M831.872 340.864 512 652.672 192.128 340.864a30.592 30.592 0 0 0-42.752 0 29.12 29.12 0 0 0 0 41.6L489.664 714.24a32 32 0 0 0 44.672 0l340.288-331.712a29.12 29.12 0 0 0 0-41.728 30.592 30.592 0 0 0-42.752 0z"></path> | ||||
|                                 </svg> | ||||
|                             </span> | ||||
|                         </button> | ||||
|                     </li> | ||||
|                     <li class="menu-item"> | ||||
|                         <button class="menu-item-link" onclick="toggleSubmenu(this)"> | ||||
|                             <span class="menu-icon"> | ||||
|                                 <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1024 1024"> | ||||
|                                     <path fill="currentColor" d="M160 448a32 32 0 0 1-32-32V160.064a32 32 0 0 1 32-32h256a32 32 0 0 1 32 32V416a32 32 0 0 1-32 32zm448 0a32 32 0 0 1-32-32V160.064a32 32 0 0 1 32-32h255.936a32 32 0 0 1 32 32V416a32 32 0 0 1-32 32zM160 896a32 32 0 0 1-32-32V608a32 32 0 0 1 32-32h256a32 32 0 0 1 32 32v256a32 32 0 0 1-32 32zm448 0a32 32 0 0 1-32-32V608a32 32 0 0 1 32-32h255.936a32 32 0 0 1 32 32v256a32 32 0 0 1-32 32z"></path> | ||||
|                                 </svg> | ||||
|                             </span> | ||||
|                             <span class="menu-text">菜市场管理</span> | ||||
|                             <span class="menu-arrow"> | ||||
|                                 <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1024 1024"> | ||||
|                                     <path fill="currentColor" d="M831.872 340.864 512 652.672 192.128 340.864a30.592 30.592 0 0 0-42.752 0 29.12 29.12 0 0 0 0 41.6L489.664 714.24a32 32 0 0 0 44.672 0l340.288-331.712a29.12 29.12 0 0 0 0-41.728 30.592 30.592 0 0 0-42.752 0z"></path> | ||||
|                                 </svg> | ||||
|                             </span> | ||||
|                         </button> | ||||
|                     </li> | ||||
|                     <li class="menu-item"> | ||||
|                         <button class="menu-item-link" onclick="toggleSubmenu(this)"> | ||||
|                             <span class="menu-icon"> | ||||
|                                 <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1024 1024"> | ||||
|                                     <path fill="currentColor" d="M160 448a32 32 0 0 1-32-32V160.064a32 32 0 0 1 32-32h256a32 32 0 0 1 32 32V416a32 32 0 0 1-32 32zm448 0a32 32 0 0 1-32-32V160.064a32 32 0 0 1 32-32h255.936a32 32 0 0 1 32 32V416a32 32 0 0 1-32 32zM160 896a32 32 0 0 1-32-32V608a32 32 0 0 1 32-32h256a32 32 0 0 1 32 32v256a32 32 0 0 1-32 32zm448 0a32 32 0 0 1-32-32V608a32 32 0 0 1 32-32h255.936a32 32 0 0 1 32 32v256a32 32 0 0 1-32 32z"></path> | ||||
|                                 </svg> | ||||
|                             </span> | ||||
|                             <span class="menu-text">云店管理</span> | ||||
|                             <span class="menu-arrow"> | ||||
|                                 <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1024 1024"> | ||||
|                                     <path fill="currentColor" d="M831.872 340.864 512 652.672 192.128 340.864a30.592 30.592 0 0 0-42.752 0 29.12 29.12 0 0 0 0 41.6L489.664 714.24a32 32 0 0 0 44.672 0l340.288-331.712a29.12 29.12 0 0 0 0-41.728 30.592 30.592 0 0 0-42.752 0z"></path> | ||||
|                                 </svg> | ||||
|                             </span> | ||||
|                         </button> | ||||
|                     </li> | ||||
|                     <li class="menu-item expanded"> | ||||
|                         <button class="menu-item-link" onclick="toggleSubmenu(this)"> | ||||
|                             <span class="menu-icon"> | ||||
|                                 <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1024 1024"> | ||||
|                                     <path fill="currentColor" d="M160 448a32 32 0 0 1-32-32V160.064a32 32 0 0 1 32-32h256a32 32 0 0 1 32 32V416a32 32 0 0 1-32 32zm448 0a32 32 0 0 1-32-32V160.064a32 32 0 0 1 32-32h255.936a32 32 0 0 1 32 32V416a32 32 0 0 1-32 32zM160 896a32 32 0 0 1-32-32V608a32 32 0 0 1 32-32h256a32 32 0 0 1 32 32v256a32 32 0 0 1-32 32zm448 0a32 32 0 0 1-32-32V608a32 32 0 0 1 32-32h255.936a32 32 0 0 1 32 32v256a32 32 0 0 1-32 32z"></path> | ||||
|                                 </svg> | ||||
|                             </span> | ||||
|                             <span class="menu-text">权限管理</span> | ||||
|                             <span class="menu-arrow"> | ||||
|                                 <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1024 1024"> | ||||
|                                     <path fill="currentColor" d="M831.872 340.864 512 652.672 192.128 340.864a30.592 30.592 0 0 0-42.752 0 29.12 29.12 0 0 0 0 41.6L489.664 714.24a32 32 0 0 0 44.672 0l340.288-331.712a29.12 29.12 0 0 0 0-41.728 30.592 30.592 0 0 0-42.752 0z"></path> | ||||
|                                 </svg> | ||||
|                             </span> | ||||
|                         </button> | ||||
|                         <div class="submenu"> | ||||
|                             <a href="#/permission/list" class="submenu-item active" onclick="openTab(this, '权限编辑')">权限编辑</a> | ||||
|                             <a href="#/permission/manager" class="submenu-item" onclick="openTab(this, '市场经营者创建')">市场经营者创建</a> | ||||
|                         </div> | ||||
|                     </li> | ||||
|                     <li class="menu-item"> | ||||
|                         <a href="#/brandManagement/brand" class="menu-item-link" onclick="openTab(this, '连锁品牌管理')"> | ||||
|                             <span class="menu-icon"> | ||||
|                                 <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1024 1024"> | ||||
|                                     <path fill="currentColor" d="M160 448a32 32 0 0 1-32-32V160.064a32 32 0 0 1 32-32h256a32 32 0 0 1 32 32V416a32 32 0 0 1-32 32zm448 0a32 32 0 0 1-32-32V160.064a32 32 0 0 1 32-32h255.936a32 32 0 0 1 32 32V416a32 32 0 0 1-32 32zM160 896a32 32 0 0 1-32-32V608a32 32 0 0 1 32-32h256a32 32 0 0 1 32 32v256a32 32 0 0 1-32 32zm448 0a32 32 0 0 1-32-32V608a32 32 0 0 1 32-32h255.936a32 32 0 0 1 32 32v256a32 32 0 0 1-32 32z"></path> | ||||
|                                 </svg> | ||||
|                             </span> | ||||
|                             <span class="menu-text">连锁品牌管理</span> | ||||
|                         </a> | ||||
|                     </li> | ||||
|                     <li class="menu-item"> | ||||
|                         <a href="#/customerManagement/customer" class="menu-item-link" onclick="openTab(this, '预约回电管理')"> | ||||
|                             <span class="menu-icon"> | ||||
|                                 <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1024 1024"> | ||||
|                                     <path fill="currentColor" d="M160 448a32 32 0 0 1-32-32V160.064a32 32 0 0 1 32-32h256a32 32 0 0 1 32 32V416a32 32 0 0 1-32 32zm448 0a32 32 0 0 1-32-32V160.064a32 32 0 0 1 32-32h255.936a32 32 0 0 1 32 32V416a32 32 0 0 1-32 32zM160 896a32 32 0 0 1-32-32V608a32 32 0 0 1 32-32h256a32 32 0 0 1 32 32v256a32 32 0 0 1-32 32zm448 0a32 32 0 0 1-32-32V608a32 32 0 0 1 32-32h255.936a32 32 0 0 1 32 32v256a32 32 0 0 1-32 32z"></path> | ||||
|                                 </svg> | ||||
|                             </span> | ||||
|                             <span class="menu-text">预约回电管理</span> | ||||
|                         </a> | ||||
|                     </li> | ||||
|                     <li class="menu-item"> | ||||
|                         <button class="menu-item-link" onclick="toggleSubmenu(this)"> | ||||
|                             <span class="menu-icon"> | ||||
|                                 <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1024 1024"> | ||||
|                                     <path fill="currentColor" d="M160 448a32 32 0 0 1-32-32V160.064a32 32 0 0 1 32-32h256a32 32 0 0 1 32 32V416a32 32 0 0 1-32 32zm448 0a32 32 0 0 1-32-32V160.064a32 32 0 0 1 32-32h255.936a32 32 0 0 1 32 32V416a32 32 0 0 1-32 32zM160 896a32 32 0 0 1-32-32V608a32 32 0 0 1 32-32h256a32 32 0 0 1 32 32v256a32 32 0 0 1-32 32zm448 0a32 32 0 0 1-32-32V608a32 32 0 0 1 32-32h255.936a32 32 0 0 1 32 32v256a32 32 0 0 1-32 32z"></path> | ||||
|                                 </svg> | ||||
|                             </span> | ||||
|                             <span class="menu-text">分销商管理</span> | ||||
|                             <span class="menu-arrow"> | ||||
|                                 <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1024 1024"> | ||||
|                                     <path fill="currentColor" d="M831.872 340.864 512 652.672 192.128 340.864a30.592 30.592 0 0 0-42.752 0 29.12 29.12 0 0 0 0 41.6L489.664 714.24a32 32 0 0 0 44.672 0l340.288-331.712a29.12 29.12 0 0 0 0-41.728 30.592 30.592 0 0 0-42.752 0z"></path> | ||||
|                                 </svg> | ||||
|                             </span> | ||||
|                         </button> | ||||
|                     </li> | ||||
|                     <li class="menu-item"> | ||||
|                         <a href="#/agent/agent-review" class="menu-item-link" onclick="openTab(this, '代理商审核入驻管理')"> | ||||
|                             <span class="menu-icon"> | ||||
|                                 <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1024 1024"> | ||||
|                                     <path fill="currentColor" d="M160 448a32 32 0 0 1-32-32V160.064a32 32 0 0 1 32-32h256a32 32 0 0 1 32 32V416a32 32 0 0 1-32 32zm448 0a32 32 0 0 1-32-32V160.064a32 32 0 0 1 32-32h255.936a32 32 0 0 1 32 32V416a32 32 0 0 1-32 32zM160 896a32 32 0 0 1-32-32V608a32 32 0 0 1 32-32h256a32 32 0 0 1 32 32v256a32 32 0 0 1-32 32zm448 0a32 32 0 0 1-32-32V608a32 32 0 0 1 32-32h255.936a32 32 0 0 1 32 32v256a32 32 0 0 1-32 32z"></path> | ||||
|                                 </svg> | ||||
|                             </span> | ||||
|                             <span class="menu-text">代理商审核入驻管理</span> | ||||
|                         </a> | ||||
|                     </li> | ||||
|                     <li class="menu-item"> | ||||
|                         <button class="menu-item-link" onclick="toggleSubmenu(this)"> | ||||
|                             <span class="menu-icon"> | ||||
|                                 <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1024 1024"> | ||||
|                                     <path fill="currentColor" d="M160 448a32 32 0 0 1-32-32V160.064a32 32 0 0 1 32-32h256a32 32 0 0 1 32 32V416a32 32 0 0 1-32 32zm448 0a32 32 0 0 1-32-32V160.064a32 32 0 0 1 32-32h255.936a32 32 0 0 1 32 32V416a32 32 0 0 1-32 32zM160 896a32 32 0 0 1-32-32V608a32 32 0 0 1 32-32h256a32 32 0 0 1 32 32v256a32 32 0 0 1-32 32zm448 0a32 32 0 0 1-32-32V608a32 32 0 0 1 32-32h255.936a32 32 0 0 1 32 32v256a32 32 0 0 1-32 32z"></path> | ||||
|                                 </svg> | ||||
|                             </span> | ||||
|                             <span class="menu-text">营销工具管理</span> | ||||
|                             <span class="menu-arrow"> | ||||
|                                 <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1024 1024"> | ||||
|                                     <path fill="currentColor" d="M831.872 340.864 512 652.672 192.128 340.864a30.592 30.592 0 0 0-42.752 0 29.12 29.12 0 0 0 0 41.6L489.664 714.24a32 32 0 0 0 44.672 0l340.288-331.712a29.12 29.12 0 0 0 0-41.728 30.592 30.592 0 0 0-42.752 0z"></path> | ||||
|                                 </svg> | ||||
|                             </span> | ||||
|                         </button> | ||||
|                     </li> | ||||
|                     <li class="menu-item"> | ||||
|                         <button class="menu-item-link" onclick="toggleSubmenu(this)"> | ||||
|                             <span class="menu-icon"> | ||||
|                                 <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1024 1024"> | ||||
|                                     <path fill="currentColor" d="M160 448a32 32 0 0 1-32-32V160.064a32 32 0 0 1 32-32h256a32 32 0 0 1 32 32V416a32 32 0 0 1-32 32zm448 0a32 32 0 0 1-32-32V160.064a32 32 0 0 1 32-32h255.936a32 32 0 0 1 32 32V416a32 32 0 0 1-32 32zM160 896a32 32 0 0 1-32-32V608a32 32 0 0 1 32-32h256a32 32 0 0 1 32 32v256a32 32 0 0 1-32 32zm448 0a32 32 0 0 1-32-32V608a32 32 0 0 1 32-32h255.936a32 32 0 0 1 32 32v256a32 32 0 0 1-32 32z"></path> | ||||
|                                 </svg> | ||||
|                             </span> | ||||
|                             <span class="menu-text">钱包管理</span> | ||||
|                             <span class="menu-arrow"> | ||||
|                                 <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1024 1024"> | ||||
|                                     <path fill="currentColor" d="M831.872 340.864 512 652.672 192.128 340.864a30.592 30.592 0 0 0-42.752 0 29.12 29.12 0 0 0 0 41.6L489.664 714.24a32 32 0 0 0 44.672 0l340.288-331.712a29.12 29.12 0 0 0 0-41.728 30.592 30.592 0 0 0-42.752 0z"></path> | ||||
|                                 </svg> | ||||
|                             </span> | ||||
|                         </button> | ||||
|                     </li> | ||||
|                     <li class="menu-item"> | ||||
|                         <button class="menu-item-link" onclick="toggleSubmenu(this)"> | ||||
|                             <span class="menu-icon"> | ||||
|                                 <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1024 1024"> | ||||
|                                     <path fill="currentColor" d="M160 448a32 32 0 0 1-32-32V160.064a32 32 0 0 1 32-32h256a32 32 0 0 1 32 32V416a32 32 0 0 1-32 32zm448 0a32 32 0 0 1-32-32V160.064a32 32 0 0 1 32-32h255.936a32 32 0 0 1 32 32V416a32 32 0 0 1-32 32zM160 896a32 32 0 0 1-32-32V608a32 32 0 0 1 32-32h256a32 32 0 0 1 32 32v256a32 32 0 0 1-32 32zm448 0a32 32 0 0 1-32-32V608a32 32 0 0 1 32-32h255.936a32 32 0 0 1 32 32v256a32 32 0 0 1-32 32z"></path> | ||||
|                                 </svg> | ||||
|                             </span> | ||||
|                             <span class="menu-text">消息通知管理</span> | ||||
|                             <span class="menu-arrow"> | ||||
|                                 <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1024 1024"> | ||||
|                                     <path fill="currentColor" d="M831.872 340.864 512 652.672 192.128 340.864a30.592 30.592 0 0 0-42.752 0 29.12 29.12 0 0 0 0 41.6L489.664 714.24a32 32 0 0 0 44.672 0l340.288-331.712a29.12 29.12 0 0 0 0-41.728 30.592 30.592 0 0 0-42.752 0z"></path> | ||||
|                                 </svg> | ||||
|                             </span> | ||||
|                         </button> | ||||
|                     </li> | ||||
|                     <li class="menu-item"> | ||||
|                         <button class="menu-item-link" onclick="toggleSubmenu(this)"> | ||||
|                             <span class="menu-icon"> | ||||
|                                 <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1024 1024"> | ||||
|                                     <path fill="currentColor" d="M160 448a32 32 0 0 1-32-32V160.064a32 32 0 0 1 32-32h256a32 32 0 0 1 32 32V416a32 32 0 0 1-32 32zm448 0a32 32 0 0 1-32-32V160.064a32 32 0 0 1 32-32h255.936a32 32 0 0 1 32 32V416a32 32 0 0 1-32 32zM160 896a32 32 0 0 1-32-32V608a32 32 0 0 1 32-32h256a32 32 0 0 1 32 32v256a32 32 0 0 1-32 32zm448 0a32 32 0 0 1-32-32V608a32 32 0 0 1 32-32h255.936a32 32 0 0 1 32 32v256a32 32 0 0 1-32 32z"></path> | ||||
|                                 </svg> | ||||
|                             </span> | ||||
|                             <span class="menu-text">数据字典</span> | ||||
|                             <span class="menu-arrow"> | ||||
|                                 <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1024 1024"> | ||||
|                                     <path fill="currentColor" d="M831.872 340.864 512 652.672 192.128 340.864a30.592 30.592 0 0 0-42.752 0 29.12 29.12 0 0 0 0 41.6L489.664 714.24a32 32 0 0 0 44.672 0l340.288-331.712a29.12 29.12 0 0 0 0-41.728 30.592 30.592 0 0 0-42.752 0z"></path> | ||||
|                                 </svg> | ||||
|                             </span> | ||||
|                         </button> | ||||
|                     </li> | ||||
|                     <li class="menu-item"> | ||||
|                         <button class="menu-item-link" onclick="toggleSubmenu(this)"> | ||||
|                             <span class="menu-icon"> | ||||
|                                 <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1024 1024"> | ||||
|                                     <path fill="currentColor" d="M160 448a32 32 0 0 1-32-32V160.064a32 32 0 0 1 32-32h256a32 32 0 0 1 32 32V416a32 32 0 0 1-32 32zm448 0a32 32 0 0 1-32-32V160.064a32 32 0 0 1 32-32h255.936a32 32 0 0 1 32 32V416a32 32 0 0 1-32 32zM160 896a32 32 0 0 1-32-32V608a32 32 0 0 1 32-32h256a32 32 0 0 1 32 32v256a32 32 0 0 1-32 32zm448 0a32 32 0 0 1-32-32V608a32 32 0 0 1 32-32h255.936a32 32 0 0 1 32 32v256a32 32 0 0 1-32 32z"></path> | ||||
|                                 </svg> | ||||
|                             </span> | ||||
|                             <span class="menu-text">系统管理</span> | ||||
|                             <span class="menu-arrow"> | ||||
|                                 <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1024 1024"> | ||||
|                                     <path fill="currentColor" d="M831.872 340.864 512 652.672 192.128 340.864a30.592 30.592 0 0 0-42.752 0 29.12 29.12 0 0 0 0 41.6L489.664 714.24a32 32 0 0 0 44.672 0l340.288-331.712a29.12 29.12 0 0 0 0-41.728 30.592 30.592 0 0 0-42.752 0z"></path> | ||||
|                                 </svg> | ||||
|                             </span> | ||||
|                         </button> | ||||
|                     </li> | ||||
|                 </ul> | ||||
|             </nav> | ||||
|         </aside> | ||||
| 
 | ||||
|         <!-- 右侧主内容区 --> | ||||
|         <main class="main-content"> | ||||
|             <!-- 顶部导航栏 --> | ||||
|             <header class="header"> | ||||
|                 <div class="header-left"> | ||||
|                     <div class="menu-trigger" onclick="toggleSidebar()"></div> | ||||
|                     <nav class="breadcrumb"> | ||||
|                         <a href="#/dashboard" class="breadcrumb-item">首页</a> | ||||
|                         <span class="breadcrumb-separator">/</span> | ||||
|                         <a href="#" class="breadcrumb-item">权限管理</a> | ||||
|                         <span class="breadcrumb-separator">/</span> | ||||
|                         <span class="breadcrumb-item">权限编辑</span> | ||||
|                     </nav> | ||||
|                 </div> | ||||
|                 <div class="header-right"> | ||||
|                     <div class="user-info"> | ||||
|                         <div class="user-avatar">A</div> | ||||
|                         <span>admin</span> | ||||
|                     </div> | ||||
|                 </div> | ||||
|             </header> | ||||
| 
 | ||||
|             <!-- 标签页区域 --> | ||||
|             <div class="tabs-container"> | ||||
|                 <div class="tab-item active" data-tab="home"> | ||||
|                     <span class="tab-title">首页</span> | ||||
|                 </div> | ||||
|                 <div class="tab-item" data-tab="permission"> | ||||
|                     <span class="tab-title">权限编辑</span> | ||||
|                     <span class="tab-close" onclick="closeTab(this)">×</span> | ||||
|                 </div> | ||||
|                 <div class="tab-item" data-tab="manager"> | ||||
|                     <span class="tab-title">市场经营者创建</span> | ||||
|                     <span class="tab-close" onclick="closeTab(this)">×</span> | ||||
|                 </div> | ||||
|             </div> | ||||
| 
 | ||||
|             <!-- 内容区域 --> | ||||
|             <div class="content-area"> | ||||
|                 <div class="content-container"> | ||||
|                     <div id="tab-content-home" class="tab-content active"> | ||||
|                         <h2>欢迎使用管理后台</h2> | ||||
|                         <p>这是首页内容区域,点击左侧菜单可以在此区域显示对应的页面内容。</p> | ||||
|                     </div> | ||||
|                     <div id="tab-content-permission" class="tab-content" style="display: none;"> | ||||
|                         <h2>权限编辑</h2> | ||||
|                         <p>这里是权限编辑页面的内容...</p> | ||||
|                     </div> | ||||
|                     <div id="tab-content-manager" class="tab-content" style="display: none;"> | ||||
|                         <h2>市场经营者创建</h2> | ||||
|                         <p>这里是市场经营者创建页面的内容...</p> | ||||
|                     </div> | ||||
|                 </div> | ||||
|             </div> | ||||
|         </main> | ||||
|     </div> | ||||
| 
 | ||||
|     <script> | ||||
|         // 切换子菜单展开状态 | ||||
|         function toggleSubmenu(button) { | ||||
|             const menuItem = button.parentElement; | ||||
|             menuItem.classList.toggle('expanded'); | ||||
|         } | ||||
| 
 | ||||
|         // 切换侧边栏显示/隐藏(移动端) | ||||
|         function toggleSidebar() { | ||||
|             const sidebar = document.querySelector('.sidebar'); | ||||
|             sidebar.classList.toggle('open'); | ||||
|         } | ||||
| 
 | ||||
|         // 打开标签页 | ||||
|         function openTab(link, title) { | ||||
|             const tabId = title.toLowerCase().replace(/\s+/g, '-'); | ||||
|              | ||||
|             // 检查标签页是否已存在 | ||||
|             const existingTab = document.querySelector(`[data-tab="${tabId}"]`); | ||||
|             if (existingTab) { | ||||
|                 // 激活已存在的标签页 | ||||
|                 setActiveTab(tabId); | ||||
|                 return; | ||||
|             } | ||||
| 
 | ||||
|             // 创建新标签页 | ||||
|             const tabsContainer = document.querySelector('.tabs-container'); | ||||
|             const newTab = document.createElement('div'); | ||||
|             newTab.className = 'tab-item'; | ||||
|             newTab.setAttribute('data-tab', tabId); | ||||
|             newTab.innerHTML = ` | ||||
|                 <span class="tab-title">${title}</span> | ||||
|                 <span class="tab-close" onclick="closeTab(this)">×</span> | ||||
|             `; | ||||
|             newTab.onclick = () => setActiveTab(tabId); | ||||
|             tabsContainer.appendChild(newTab); | ||||
| 
 | ||||
|             // 创建新内容区域 | ||||
|             const contentArea = document.querySelector('.content-container'); | ||||
|             const newContent = document.createElement('div'); | ||||
|             newContent.id = `tab-content-${tabId}`; | ||||
|             newContent.className = 'tab-content'; | ||||
|             newContent.style.display = 'none'; | ||||
|             newContent.innerHTML = ` | ||||
|                 <h2>${title}</h2> | ||||
|                 <p>这里是${title}页面的内容...</p> | ||||
|             `; | ||||
|             contentArea.appendChild(newContent); | ||||
| 
 | ||||
|             // 激活新标签页 | ||||
|             setActiveTab(tabId); | ||||
|         } | ||||
| 
 | ||||
|         // 设置活动标签页 | ||||
|         function setActiveTab(tabId) { | ||||
|             // 移除所有标签页的活动状态 | ||||
|             document.querySelectorAll('.tab-item').forEach(tab => { | ||||
|                 tab.classList.remove('active'); | ||||
|             }); | ||||
|             document.querySelectorAll('.tab-content').forEach(content => { | ||||
|                 content.style.display = 'none'; | ||||
|             }); | ||||
| 
 | ||||
|             // 激活指定标签页 | ||||
|             const activeTab = document.querySelector(`[data-tab="${tabId}"]`); | ||||
|             const activeContent = document.querySelector(`#tab-content-${tabId}`); | ||||
|              | ||||
|             if (activeTab && activeContent) { | ||||
|                 activeTab.classList.add('active'); | ||||
|                 activeContent.style.display = 'block'; | ||||
|             } | ||||
|         } | ||||
| 
 | ||||
|         // 关闭标签页 | ||||
|         function closeTab(closeBtn) { | ||||
|             const tab = closeBtn.parentElement; | ||||
|             const tabId = tab.getAttribute('data-tab'); | ||||
|              | ||||
|             // 不能关闭首页标签 | ||||
|             if (tabId === 'home') { | ||||
|                 return; | ||||
|             } | ||||
| 
 | ||||
|             const isActive = tab.classList.contains('active'); | ||||
|              | ||||
|             // 移除标签页和内容 | ||||
|             tab.remove(); | ||||
|             const content = document.querySelector(`#tab-content-${tabId}`); | ||||
|             if (content) { | ||||
|                 content.remove(); | ||||
|             } | ||||
| 
 | ||||
|             // 如果关闭的是活动标签页,则激活首页 | ||||
|             if (isActive) { | ||||
|                 setActiveTab('home'); | ||||
|             } | ||||
|         } | ||||
| 
 | ||||
|         // 标签页点击事件 | ||||
|         document.querySelectorAll('.tab-item').forEach(tab => { | ||||
|             tab.onclick = () => { | ||||
|                 const tabId = tab.getAttribute('data-tab'); | ||||
|                 setActiveTab(tabId); | ||||
|             }; | ||||
|         }); | ||||
| 
 | ||||
|         // 菜单项点击事件处理 | ||||
|         document.querySelectorAll('.submenu-item').forEach(item => { | ||||
|             item.addEventListener('click', function(e) { | ||||
|                 e.preventDefault(); | ||||
|                  | ||||
|                 // 移除其他菜单项的激活状态 | ||||
|                 document.querySelectorAll('.submenu-item.active').forEach(activeItem => { | ||||
|                     activeItem.classList.remove('active'); | ||||
|                 }); | ||||
|                  | ||||
|                 // 激活当前菜单项 | ||||
|                 this.classList.add('active'); | ||||
|                  | ||||
|                 // 如果有onclick属性,执行它 | ||||
|                 if (this.onclick) { | ||||
|                     this.onclick.call(this); | ||||
|                 } | ||||
|             }); | ||||
|         }); | ||||
| 
 | ||||
|         // 响应式处理 | ||||
|         window.addEventListener('resize', function() { | ||||
|             if (window.innerWidth > 768) { | ||||
|                 document.querySelector('.sidebar').classList.remove('open'); | ||||
|             } | ||||
|         }); | ||||
| 
 | ||||
|         // 点击外部区域关闭侧边栏(移动端) | ||||
|         document.addEventListener('click', function(e) { | ||||
|             const sidebar = document.querySelector('.sidebar'); | ||||
|             const menuTrigger = document.querySelector('.menu-trigger'); | ||||
|              | ||||
|             if (window.innerWidth <= 768 &&  | ||||
|                 sidebar.classList.contains('open') &&  | ||||
|                 !sidebar.contains(e.target) &&  | ||||
|                 !menuTrigger.contains(e.target)) { | ||||
|                 sidebar.classList.remove('open'); | ||||
|             } | ||||
|         }); | ||||
|     </script> | ||||
| </body> | ||||
| </html> | ||||
		Loading…
	
		Reference in New Issue