H5的等级设置完成
This commit is contained in:
		
							parent
							
								
									933b69b0a6
								
							
						
					
					
						commit
						93d2871525
					
				|  | @ -1,470 +0,0 @@ | |||
| <!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: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif; | ||||
|             background-color: #f5f5f5; | ||||
|             color: #333; | ||||
|             height: 100vh; | ||||
|             overflow: hidden; | ||||
|         } | ||||
| 
 | ||||
|         /* 顶部导航栏 */ | ||||
|         .header { | ||||
|             background-color: #28a745; | ||||
|             color: white; | ||||
|             padding: 8px 15px; | ||||
|             display: flex; | ||||
|             align-items: center; | ||||
|             position: relative; | ||||
|             height: 50px; | ||||
|         } | ||||
| 
 | ||||
|         .back-arrow { | ||||
|             font-size: 18px; | ||||
|             margin-right: 15px; | ||||
|             cursor: pointer; | ||||
|             user-select: none; | ||||
|         } | ||||
| 
 | ||||
|         .back-arrow:hover { | ||||
|             opacity: 0.8; | ||||
|         } | ||||
| 
 | ||||
|         .header-title { | ||||
|             font-size: 16px; | ||||
|             font-weight: 500; | ||||
|         } | ||||
| 
 | ||||
|         /* 搜索区域 */ | ||||
|         .search-section { | ||||
|             background: white; | ||||
|             padding: 12px 15px; | ||||
|             margin: 10px 15px; | ||||
|             border-radius: 6px; | ||||
|             box-shadow: 0 1px 3px rgba(0,0,0,0.1); | ||||
|         } | ||||
| 
 | ||||
|         .search-row { | ||||
|             display: flex; | ||||
|             align-items: center; | ||||
|             gap: 10px; | ||||
|             flex-wrap: wrap; | ||||
|         } | ||||
| 
 | ||||
|         .search-label { | ||||
|             font-size: 14px; | ||||
|             color: #666; | ||||
|             white-space: nowrap; | ||||
|         } | ||||
| 
 | ||||
|         .search-input { | ||||
|             flex: 1; | ||||
|             min-width: 180px; | ||||
|             padding: 8px 12px; | ||||
|             border: 1px solid #ddd; | ||||
|             border-radius: 4px; | ||||
|             background-color: #f8f9fa; | ||||
|             font-size: 14px; | ||||
|         } | ||||
| 
 | ||||
|         .search-input::placeholder { | ||||
|             color: #999; | ||||
|         } | ||||
| 
 | ||||
|         .search-input:focus { | ||||
|             outline: none; | ||||
|             border-color: #28a745; | ||||
|             background-color: white; | ||||
|         } | ||||
| 
 | ||||
|         .btn { | ||||
|             padding: 8px 15px; | ||||
|             border: none; | ||||
|             border-radius: 4px; | ||||
|             font-size: 13px; | ||||
|             cursor: pointer; | ||||
|             transition: all 0.3s ease; | ||||
|             white-space: nowrap; | ||||
|         } | ||||
| 
 | ||||
|         .btn-primary { | ||||
|             background-color: #28a745; | ||||
|             color: white; | ||||
|         } | ||||
| 
 | ||||
|         .btn-primary:hover { | ||||
|             background-color: #218838; | ||||
|             transform: translateY(-1px); | ||||
|         } | ||||
| 
 | ||||
|         .btn-secondary { | ||||
|             background-color: #6c757d; | ||||
|             color: white; | ||||
|         } | ||||
| 
 | ||||
|         .btn-secondary:hover { | ||||
|             background-color: #5a6268; | ||||
|             transform: translateY(-1px); | ||||
|         } | ||||
| 
 | ||||
|         /* 表格容器 */ | ||||
|         .table-container { | ||||
|             background: white; | ||||
|             margin: 10px 15px; | ||||
|             border-radius: 6px; | ||||
|             box-shadow: 0 1px 3px rgba(0,0,0,0.1); | ||||
|             overflow: hidden; | ||||
|             flex: 1; | ||||
|             display: flex; | ||||
|             flex-direction: column; | ||||
|         } | ||||
| 
 | ||||
|         .table { | ||||
|             width: 100%; | ||||
|             border-collapse: collapse; | ||||
|             font-size: 14px; | ||||
|         } | ||||
| 
 | ||||
|         .table th { | ||||
|             background-color: #f8f9fa; | ||||
|             padding: 10px 8px; | ||||
|             text-align: left; | ||||
|             font-weight: 500; | ||||
|             color: #666; | ||||
|             border-bottom: 1px solid #dee2e6; | ||||
|             font-size: 13px; | ||||
|         } | ||||
| 
 | ||||
|         .table td { | ||||
|             padding: 10px 8px; | ||||
|             border-bottom: 1px solid #dee2e6; | ||||
|             vertical-align: middle; | ||||
|             font-size: 13px; | ||||
|         } | ||||
| 
 | ||||
|         .table tbody tr:hover { | ||||
|             background-color: #f8f9fa; | ||||
|         } | ||||
| 
 | ||||
|         /* 开关按钮 */ | ||||
|         .switch { | ||||
|             position: relative; | ||||
|             display: inline-block; | ||||
|             width: 42px; | ||||
|             height: 20px; | ||||
|         } | ||||
| 
 | ||||
|         .switch input { | ||||
|             opacity: 0; | ||||
|             width: 0; | ||||
|             height: 0; | ||||
|         } | ||||
| 
 | ||||
|         .slider { | ||||
|             position: absolute; | ||||
|             cursor: pointer; | ||||
|             top: 0; | ||||
|             left: 0; | ||||
|             right: 0; | ||||
|             bottom: 0; | ||||
|             background-color: #ccc; | ||||
|             transition: .4s; | ||||
|             border-radius: 20px; | ||||
|         } | ||||
| 
 | ||||
|         .slider:before { | ||||
|             position: absolute; | ||||
|             content: ""; | ||||
|             height: 14px; | ||||
|             width: 14px; | ||||
|             left: 3px; | ||||
|             bottom: 3px; | ||||
|             background-color: white; | ||||
|             transition: .4s; | ||||
|             border-radius: 50%; | ||||
|         } | ||||
| 
 | ||||
|         input:checked + .slider { | ||||
|             background-color: #28a745; | ||||
|         } | ||||
| 
 | ||||
|         input:checked + .slider:before { | ||||
|             transform: translateX(22px); | ||||
|         } | ||||
| 
 | ||||
|         /* 等级标签 */ | ||||
|         .level-tags { | ||||
|             display: flex; | ||||
|             gap: 5px; | ||||
|             flex-wrap: wrap; | ||||
|         } | ||||
| 
 | ||||
|         .level-tag { | ||||
|             background-color: #e9ecef; | ||||
|             color: #495057; | ||||
|             padding: 3px 6px; | ||||
|             border-radius: 10px; | ||||
|             font-size: 11px; | ||||
|             font-weight: 500; | ||||
|         } | ||||
| 
 | ||||
|         /* 操作按钮 */ | ||||
|         .btn-detail { | ||||
|             background-color: #007bff; | ||||
|             color: white; | ||||
|             padding: 5px 10px; | ||||
|             border: none; | ||||
|             border-radius: 4px; | ||||
|             font-size: 11px; | ||||
|             cursor: pointer; | ||||
|             transition: all 0.3s ease; | ||||
|         } | ||||
| 
 | ||||
|         .btn-detail:hover { | ||||
|             background-color: #0056b3; | ||||
|             transform: translateY(-1px); | ||||
|         } | ||||
| 
 | ||||
|         /* 容器布局 */ | ||||
|         .container { | ||||
|             display: flex; | ||||
|             flex-direction: column; | ||||
|             height: 100vh; | ||||
|         } | ||||
| 
 | ||||
|         /* 响应式设计 */ | ||||
|         @media (max-width: 768px) { | ||||
|             .header { | ||||
|                 padding: 12px 15px; | ||||
|             } | ||||
| 
 | ||||
|             .search-section, .table-container { | ||||
|                 margin: 15px; | ||||
|             } | ||||
| 
 | ||||
|             .search-row { | ||||
|                 flex-direction: column; | ||||
|                 align-items: stretch; | ||||
|             } | ||||
| 
 | ||||
|             .search-input { | ||||
|                 min-width: auto; | ||||
|             } | ||||
| 
 | ||||
|             .table-container { | ||||
|                 overflow-x: auto; | ||||
|             } | ||||
| 
 | ||||
|             .table { | ||||
|                 min-width: 600px; | ||||
|             } | ||||
| 
 | ||||
|             .table th, .table td { | ||||
|                 padding: 10px 8px; | ||||
|                 font-size: 13px; | ||||
|             } | ||||
|         } | ||||
| 
 | ||||
|         @media (max-width: 480px) { | ||||
|             .search-section { | ||||
|                 padding: 15px; | ||||
|             } | ||||
| 
 | ||||
|             .btn { | ||||
|                 padding: 8px 15px; | ||||
|                 font-size: 13px; | ||||
|             } | ||||
| 
 | ||||
|             .header-title { | ||||
|                 font-size: 16px; | ||||
|             } | ||||
|         } | ||||
|     </style> | ||||
| </head> | ||||
| <body> | ||||
|     <div class="container"> | ||||
|         <!-- 顶部导航栏 --> | ||||
|         <div class="header"> | ||||
|             <span class="back-arrow" onclick="history.back()">←</span> | ||||
|             <h1 class="header-title">等级设置</h1> | ||||
|         </div> | ||||
| 
 | ||||
|         <!-- 搜索区域 --> | ||||
|         <div class="search-section"> | ||||
|             <div class="search-row"> | ||||
|                 <span class="search-label">摊位名称</span> | ||||
|                 <input type="text" class="search-input" placeholder="请点击摊位名称..."> | ||||
|                 <button class="btn btn-primary">查询</button> | ||||
|                 <button class="btn btn-secondary">批量会员等级编辑</button> | ||||
|             </div> | ||||
|         </div> | ||||
| 
 | ||||
|         <!-- 数据表格 --> | ||||
|         <div class="table-container"> | ||||
|         <table class="table"> | ||||
|             <thead> | ||||
|                 <tr> | ||||
|                     <th>摊位名称</th> | ||||
|                     <th>是否启用会员</th> | ||||
|                     <th>会员等级</th> | ||||
|                     <th>操作</th> | ||||
|                 </tr> | ||||
|             </thead> | ||||
|             <tbody> | ||||
|                 <tr> | ||||
|                     <td>时尚服装店</td> | ||||
|                     <td> | ||||
|                         <label class="switch"> | ||||
|                             <input type="checkbox" checked> | ||||
|                             <span class="slider"></span> | ||||
|                         </label> | ||||
|                     </td> | ||||
|                     <td> | ||||
|                         <div class="level-tags"> | ||||
|                             <span class="level-tag">lv1</span> | ||||
|                             <span class="level-tag">lv2</span> | ||||
|                             <span class="level-tag">lv3</span> | ||||
|                             <span class="level-tag">lv4</span> | ||||
|                         </div> | ||||
|                     </td> | ||||
|                     <td> | ||||
|                         <button class="btn-detail" onclick="openLevelDetail('时尚服装店')">设置等级明细</button> | ||||
|                     </td> | ||||
|                 </tr> | ||||
|                 <tr> | ||||
|                     <td>数码电子城</td> | ||||
|                     <td> | ||||
|                         <label class="switch"> | ||||
|                             <input type="checkbox"> | ||||
|                             <span class="slider"></span> | ||||
|                         </label> | ||||
|                     </td> | ||||
|                     <td> | ||||
|                         <div class="level-tags"> | ||||
|                             <span class="level-tag">lv1</span> | ||||
|                             <span class="level-tag">lv2</span> | ||||
|                             <span class="level-tag">lv3</span> | ||||
|                         </div> | ||||
|                     </td> | ||||
|                     <td> | ||||
|                         <button class="btn-detail" onclick="openLevelDetail('数码电子城')">设置等级明细</button> | ||||
|                     </td> | ||||
|                 </tr> | ||||
|                 <tr> | ||||
|                     <td>美食餐厅</td> | ||||
|                     <td> | ||||
|                         <label class="switch"> | ||||
|                             <input type="checkbox" checked> | ||||
|                             <span class="slider"></span> | ||||
|                         </label> | ||||
|                     </td> | ||||
|                     <td> | ||||
|                         <div class="level-tags"> | ||||
|                             <span class="level-tag">lv1</span> | ||||
|                             <span class="level-tag">lv2</span> | ||||
|                             <span class="level-tag">lv3</span> | ||||
|                             <span class="level-tag">lv4</span> | ||||
|                         </div> | ||||
|                     </td> | ||||
|                     <td> | ||||
|                         <button class="btn-detail" onclick="openLevelDetail('美食餐厅')">设置等级明细</button> | ||||
|                     </td> | ||||
|                 </tr> | ||||
|                 <tr> | ||||
|                     <td>家居生活馆</td> | ||||
|                     <td> | ||||
|                         <label class="switch"> | ||||
|                             <input type="checkbox"> | ||||
|                             <span class="slider"></span> | ||||
|                         </label> | ||||
|                     </td> | ||||
|                     <td> | ||||
|                         <div class="level-tags"> | ||||
|                             <span class="level-tag">lv1</span> | ||||
|                             <span class="level-tag">lv2</span> | ||||
|                         </div> | ||||
|                     </td> | ||||
|                     <td> | ||||
|                         <button class="btn-detail" onclick="openLevelDetail('家居生活馆')">设置等级明细</button> | ||||
|                     </td> | ||||
|                 </tr> | ||||
|                 <tr> | ||||
|                     <td>运动健身店</td> | ||||
|                     <td> | ||||
|                         <label class="switch"> | ||||
|                             <input type="checkbox" checked> | ||||
|                             <span class="slider"></span> | ||||
|                         </label> | ||||
|                     </td> | ||||
|                     <td> | ||||
|                         <div class="level-tags"> | ||||
|                             <span class="level-tag">lv1</span> | ||||
|                             <span class="level-tag">lv2</span> | ||||
|                             <span class="level-tag">lv3</span> | ||||
|                             <span class="level-tag">lv4</span> | ||||
|                         </div> | ||||
|                     </td> | ||||
|                     <td> | ||||
|                         <button class="btn-detail" onclick="openLevelDetail('运动健身店')">设置等级明细</button> | ||||
|                     </td> | ||||
|                 </tr> | ||||
|             </tbody> | ||||
|         </table> | ||||
|     </div> | ||||
|     </div> | ||||
| 
 | ||||
|     <script> | ||||
|         // 设置等级明细功能 | ||||
|         function openLevelDetail(storeName) { | ||||
|             alert('打开 ' + storeName + ' 的等级明细设置页面'); | ||||
|             // 实际项目中这里会跳转到详细设置页面 | ||||
|         } | ||||
| 
 | ||||
|         // 查询功能 | ||||
|         document.querySelector('.btn-primary').addEventListener('click', function() { | ||||
|             const searchValue = document.querySelector('.search-input').value; | ||||
|             if (searchValue.trim()) { | ||||
|                 alert('搜索: ' + searchValue); | ||||
|                 // 实际项目中这里会执行搜索逻辑 | ||||
|             } else { | ||||
|                 alert('请输入摊位名称'); | ||||
|             } | ||||
|         }); | ||||
| 
 | ||||
|         // 批量编辑功能 | ||||
|         document.querySelector('.btn-secondary').addEventListener('click', function() { | ||||
|             alert('打开批量会员等级编辑页面'); | ||||
|             // 实际项目中这里会跳转到批量编辑页面 | ||||
|         }); | ||||
| 
 | ||||
|         // 开关状态变化监听 | ||||
|         document.querySelectorAll('.switch input').forEach(function(switchInput) { | ||||
|             switchInput.addEventListener('change', function() { | ||||
|                 const row = this.closest('tr'); | ||||
|                 const storeName = row.querySelector('td:first-child').textContent; | ||||
|                 const isEnabled = this.checked ? '启用' : '关闭'; | ||||
|                 console.log(storeName + ' 会员功能已' + isEnabled); | ||||
|                 // 实际项目中这里会发送API请求更新状态 | ||||
|             }); | ||||
|         }); | ||||
| 
 | ||||
|         // 搜索框回车搜索 | ||||
|         document.querySelector('.search-input').addEventListener('keypress', function(e) { | ||||
|             if (e.key === 'Enter') { | ||||
|                 document.querySelector('.btn-primary').click(); | ||||
|             } | ||||
|         }); | ||||
|     </script> | ||||
| </body> | ||||
| </html> | ||||
|  | @ -0,0 +1,474 @@ | |||
| <!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: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif; | ||||
|             background-color: #f5f5f5; | ||||
|             color: #333; | ||||
|         } | ||||
| 
 | ||||
|         /* 顶部导航栏 */ | ||||
|         .header { | ||||
|             background-color: #4CAF50; | ||||
|             color: white; | ||||
|             padding: 15px 20px; | ||||
|             display: flex; | ||||
|             align-items: center; | ||||
|             position: fixed; | ||||
|             top: 0; | ||||
|             left: 0; | ||||
|             right: 0; | ||||
|             z-index: 100; | ||||
|             box-shadow: 0 2px 4px rgba(0,0,0,0.1); | ||||
|         } | ||||
| 
 | ||||
|         .back-btn { | ||||
|             background: none; | ||||
|             border: none; | ||||
|             color: white; | ||||
|             font-size: 18px; | ||||
|             cursor: pointer; | ||||
|             margin-right: 15px; | ||||
|         } | ||||
| 
 | ||||
|         .header-title { | ||||
|             font-size: 18px; | ||||
|             font-weight: 500; | ||||
|         } | ||||
| 
 | ||||
|         /* 主要内容区域 */ | ||||
|         .content { | ||||
|             margin-top: 60px; | ||||
|             padding: 20px; | ||||
|         } | ||||
| 
 | ||||
|         /* 搜索区域 */ | ||||
|         .search-section { | ||||
|             background: white; | ||||
|             padding: 20px; | ||||
|             border-radius: 8px; | ||||
|             margin-bottom: 20px; | ||||
|             box-shadow: 0 2px 8px rgba(0,0,0,0.1); | ||||
|         } | ||||
| 
 | ||||
|         .search-row { | ||||
|             display: flex; | ||||
|             align-items: center; | ||||
|             margin-bottom: 15px; | ||||
|         } | ||||
| 
 | ||||
|         .search-label { | ||||
|             width: 100px; | ||||
|             font-size: 14px; | ||||
|             color: #666; | ||||
|             margin-right: 10px; | ||||
|         } | ||||
| 
 | ||||
|         .search-input { | ||||
|             flex: 1; | ||||
|             padding: 10px 15px; | ||||
|             border: 1px solid #ddd; | ||||
|             border-radius: 4px; | ||||
|             background-color: #f8f8f8; | ||||
|             font-size: 14px; | ||||
|             color: #999; | ||||
|             margin-right: 10px; | ||||
|         } | ||||
| 
 | ||||
|         .btn { | ||||
|             padding: 10px 20px; | ||||
|             border: none; | ||||
|             border-radius: 4px; | ||||
|             font-size: 14px; | ||||
|             cursor: pointer; | ||||
|             transition: all 0.3s; | ||||
|         } | ||||
| 
 | ||||
|         .btn-primary { | ||||
|             background-color: #4CAF50; | ||||
|             color: white; | ||||
|         } | ||||
| 
 | ||||
|         .btn-primary:hover { | ||||
|             background-color: #45a049; | ||||
|         } | ||||
| 
 | ||||
|         .btn-secondary { | ||||
|             background-color: #f0f0f0; | ||||
|             color: #666; | ||||
|             border: 1px solid #ddd; | ||||
|         } | ||||
| 
 | ||||
|         .btn-secondary:hover { | ||||
|             background-color: #e8e8e8; | ||||
|         } | ||||
| 
 | ||||
|         /* 表格容器 */ | ||||
|         .table-container { | ||||
|             background: white; | ||||
|             border-radius: 8px; | ||||
|             overflow: hidden; | ||||
|             box-shadow: 0 2px 8px rgba(0,0,0,0.1); | ||||
|         } | ||||
| 
 | ||||
|         .table { | ||||
|             width: 100%; | ||||
|             border-collapse: collapse; | ||||
|         } | ||||
| 
 | ||||
|         .table th, | ||||
|         .table td { | ||||
|             padding: 12px 8px; | ||||
|             text-align: left; | ||||
|             border-bottom: 1px solid #eee; | ||||
|             vertical-align: middle; | ||||
|         } | ||||
| 
 | ||||
|         .table th:first-child, | ||||
|         .table td:first-child { | ||||
|             width: 25%; | ||||
|         } | ||||
| 
 | ||||
|         .table th:nth-child(2), | ||||
|         .table td:nth-child(2) { | ||||
|             width: 15%; | ||||
|             text-align: center; | ||||
|         } | ||||
| 
 | ||||
|         .table th:nth-child(3), | ||||
|         .table td:nth-child(3) { | ||||
|             width: 35%; | ||||
|         } | ||||
| 
 | ||||
|         .table th:nth-child(4), | ||||
|         .table td:nth-child(4) { | ||||
|             width: 25%; | ||||
|             text-align: center; | ||||
|         } | ||||
| 
 | ||||
|         .table th { | ||||
|             background-color: #f8f9fa; | ||||
|             font-weight: 500; | ||||
|             color: #666; | ||||
|             font-size: 14px; | ||||
|         } | ||||
| 
 | ||||
|         .table td { | ||||
|             font-size: 14px; | ||||
|         } | ||||
| 
 | ||||
|         .table tr:last-child td { | ||||
|             border-bottom: none; | ||||
|         } | ||||
| 
 | ||||
|         /* 开关按钮 */ | ||||
|         .switch { | ||||
|             position: relative; | ||||
|             display: inline-block; | ||||
|             width: 44px; | ||||
|             height: 22px; | ||||
|         } | ||||
| 
 | ||||
|         .switch input { | ||||
|             opacity: 0; | ||||
|             width: 0; | ||||
|             height: 0; | ||||
|         } | ||||
| 
 | ||||
|         .slider { | ||||
|             position: absolute; | ||||
|             cursor: pointer; | ||||
|             top: 0; | ||||
|             left: 0; | ||||
|             right: 0; | ||||
|             bottom: 0; | ||||
|             background-color: #ccc; | ||||
|             transition: .4s; | ||||
|             border-radius: 24px; | ||||
|         } | ||||
| 
 | ||||
|         .slider:before { | ||||
|             position: absolute; | ||||
|             content: ""; | ||||
|             height: 16px; | ||||
|             width: 16px; | ||||
|             left: 3px; | ||||
|             bottom: 3px; | ||||
|             background-color: white; | ||||
|             transition: .4s; | ||||
|             border-radius: 50%; | ||||
|         } | ||||
| 
 | ||||
|         input:checked + .slider { | ||||
|             background-color: #4CAF50; | ||||
|         } | ||||
| 
 | ||||
|         input:checked + .slider:before { | ||||
|             transform: translateX(22px); | ||||
|         } | ||||
| 
 | ||||
|         /* 等级标签 */ | ||||
|         .level-tags { | ||||
|             display: flex; | ||||
|             gap: 3px; | ||||
|             flex-wrap: wrap; | ||||
|         } | ||||
| 
 | ||||
|         .level-tag { | ||||
|             background-color: #f0f8ff; | ||||
|             color: #4CAF50; | ||||
|             padding: 2px 6px; | ||||
|             border-radius: 3px; | ||||
|             font-size: 11px; | ||||
|             border: 1px solid #e6f7ff; | ||||
|             white-space: nowrap; | ||||
|         } | ||||
| 
 | ||||
|         /* 操作按钮 */ | ||||
|         .action-btn { | ||||
|             background-color: #4CAF50; | ||||
|             color: white; | ||||
|             padding: 5px 8px; | ||||
|             border: none; | ||||
|             border-radius: 4px; | ||||
|             font-size: 11px; | ||||
|             cursor: pointer; | ||||
|             transition: all 0.3s; | ||||
|             white-space: nowrap; | ||||
|         } | ||||
| 
 | ||||
|         .action-btn:hover { | ||||
|             background-color: #45a049; | ||||
|         } | ||||
| 
 | ||||
|         /* 响应式设计 */ | ||||
|         @media (max-width: 768px) { | ||||
|             .content { | ||||
|                 padding: 15px; | ||||
|             } | ||||
| 
 | ||||
|             .search-row { | ||||
|                 flex-direction: column; | ||||
|                 align-items: stretch; | ||||
|             } | ||||
| 
 | ||||
|             .search-label { | ||||
|                 width: auto; | ||||
|                 margin-bottom: 5px; | ||||
|             } | ||||
| 
 | ||||
|             .search-input { | ||||
|                 margin-right: 0; | ||||
|                 margin-bottom: 10px; | ||||
|             } | ||||
| 
 | ||||
|             .table th, | ||||
|             .table td { | ||||
|                 padding: 10px 6px; | ||||
|                 font-size: 13px; | ||||
|             } | ||||
| 
 | ||||
|             .level-tag { | ||||
|                 font-size: 10px; | ||||
|                 padding: 1px 4px; | ||||
|             } | ||||
| 
 | ||||
|             .action-btn { | ||||
|                 font-size: 10px; | ||||
|                 padding: 4px 6px; | ||||
|             } | ||||
| 
 | ||||
|             .switch { | ||||
|                 width: 40px; | ||||
|                 height: 20px; | ||||
|             } | ||||
| 
 | ||||
|             .slider:before { | ||||
|                 height: 14px; | ||||
|                 width: 14px; | ||||
|             } | ||||
| 
 | ||||
|             input:checked + .slider:before { | ||||
|                 transform: translateX(20px); | ||||
|             } | ||||
|         } | ||||
|     </style> | ||||
| </head> | ||||
| <body> | ||||
|     <!-- 顶部导航栏 --> | ||||
|     <div class="header"> | ||||
|         <button class="back-btn" onclick="history.back()">‹</button> | ||||
|         <div class="header-title">等级设置</div> | ||||
|     </div> | ||||
| 
 | ||||
|     <!-- 主要内容 --> | ||||
|     <div class="content"> | ||||
|         <!-- 搜索区域 --> | ||||
|         <div class="search-section"> | ||||
|             <div class="search-row"> | ||||
|                 <div class="search-label">挑位名称</div> | ||||
|                 <input type="text" class="search-input" placeholder="请选择挑位名称..."> | ||||
|                 <button class="btn btn-primary">查询</button> | ||||
|             </div> | ||||
|             <div class="search-row"> | ||||
|                 <div style="flex: 1;"></div> | ||||
|                 <button class="btn btn-secondary">批量会员等级编辑</button> | ||||
|             </div> | ||||
|         </div> | ||||
| 
 | ||||
|         <!-- 数据表格 --> | ||||
|         <div class="table-container"> | ||||
|             <table class="table"> | ||||
|                 <thead> | ||||
|                     <tr> | ||||
|                         <th>挑位名称</th> | ||||
|                         <th>是否启用会员</th> | ||||
|                         <th>会员等级</th> | ||||
|                         <th>操作</th> | ||||
|                     </tr> | ||||
|                 </thead> | ||||
|                 <tbody> | ||||
|                     <tr> | ||||
|                         <td>时尚服装店</td> | ||||
|                         <td> | ||||
|                             <label class="switch"> | ||||
|                                 <input type="checkbox" checked> | ||||
|                                 <span class="slider"></span> | ||||
|                             </label> | ||||
|                         </td> | ||||
|                         <td> | ||||
|                             <div class="level-tags"> | ||||
|                                 <span class="level-tag">lv1</span> | ||||
|                                 <span class="level-tag">lv2</span> | ||||
|                                 <span class="level-tag">lv3</span> | ||||
|                                 <span class="level-tag">lv4</span> | ||||
|                             </div> | ||||
|                         </td> | ||||
|                         <td> | ||||
|                             <button class="action-btn">设置等级明细</button> | ||||
|                         </td> | ||||
|                     </tr> | ||||
|                     <tr> | ||||
|                         <td>数码电子城</td> | ||||
|                         <td> | ||||
|                             <label class="switch"> | ||||
|                                 <input type="checkbox"> | ||||
|                                 <span class="slider"></span> | ||||
|                             </label> | ||||
|                         </td> | ||||
|                         <td> | ||||
|                             <div class="level-tags"> | ||||
|                                 <span class="level-tag">lv1</span> | ||||
|                                 <span class="level-tag">lv2</span> | ||||
|                                 <span class="level-tag">lv3</span> | ||||
|                             </div> | ||||
|                         </td> | ||||
|                         <td> | ||||
|                             <button class="action-btn">设置等级明细</button> | ||||
|                         </td> | ||||
|                     </tr> | ||||
|                     <tr> | ||||
|                         <td>美食餐厅</td> | ||||
|                         <td> | ||||
|                             <label class="switch"> | ||||
|                                 <input type="checkbox" checked> | ||||
|                                 <span class="slider"></span> | ||||
|                             </label> | ||||
|                         </td> | ||||
|                         <td> | ||||
|                             <div class="level-tags"> | ||||
|                                 <span class="level-tag">lv1</span> | ||||
|                                 <span class="level-tag">lv2</span> | ||||
|                                 <span class="level-tag">lv3</span> | ||||
|                                 <span class="level-tag">lv4</span> | ||||
|                             </div> | ||||
|                         </td> | ||||
|                         <td> | ||||
|                             <button class="action-btn">设置等级明细</button> | ||||
|                         </td> | ||||
|                     </tr> | ||||
|                     <tr> | ||||
|                         <td>家居生活馆</td> | ||||
|                         <td> | ||||
|                             <label class="switch"> | ||||
|                                 <input type="checkbox"> | ||||
|                                 <span class="slider"></span> | ||||
|                             </label> | ||||
|                         </td> | ||||
|                         <td> | ||||
|                             <div class="level-tags"> | ||||
|                                 <span class="level-tag">lv1</span> | ||||
|                                 <span class="level-tag">lv2</span> | ||||
|                             </div> | ||||
|                         </td> | ||||
|                         <td> | ||||
|                             <button class="action-btn">设置等级明细</button> | ||||
|                         </td> | ||||
|                     </tr> | ||||
|                     <tr> | ||||
|                         <td>运动健身店</td> | ||||
|                         <td> | ||||
|                             <label class="switch"> | ||||
|                                 <input type="checkbox" checked> | ||||
|                                 <span class="slider"></span> | ||||
|                             </label> | ||||
|                         </td> | ||||
|                         <td> | ||||
|                             <div class="level-tags"> | ||||
|                                 <span class="level-tag">lv1</span> | ||||
|                                 <span class="level-tag">lv2</span> | ||||
|                                 <span class="level-tag">lv3</span> | ||||
|                                 <span class="level-tag">lv4</span> | ||||
|                             </div> | ||||
|                         </td> | ||||
|                         <td> | ||||
|                             <button class="action-btn">设置等级明细</button> | ||||
|                         </td> | ||||
|                     </tr> | ||||
|                 </tbody> | ||||
|             </table> | ||||
|         </div> | ||||
|     </div> | ||||
| 
 | ||||
|     <script> | ||||
|         // 开关按钮交互效果 | ||||
|         document.querySelectorAll('.switch input').forEach(function(switchInput) { | ||||
|             switchInput.addEventListener('change', function() { | ||||
|                 console.log('开关状态:', this.checked ? '开启' : '关闭'); | ||||
|             }); | ||||
|         }); | ||||
| 
 | ||||
|         // 查询按钮点击事件 | ||||
|         document.querySelector('.btn-primary').addEventListener('click', function() { | ||||
|             const searchValue = document.querySelector('.search-input').value; | ||||
|             console.log('查询内容:', searchValue); | ||||
|             alert('查询功能演示:' + (searchValue || '请选择挑位名称')); | ||||
|         }); | ||||
| 
 | ||||
|         // 批量编辑按钮点击事件 | ||||
|         document.querySelector('.btn-secondary').addEventListener('click', function() { | ||||
|             console.log('批量会员等级编辑'); | ||||
|             alert('批量会员等级编辑功能演示'); | ||||
|         }); | ||||
| 
 | ||||
|         // 设置等级明细按钮点击事件 | ||||
|         document.querySelectorAll('.action-btn').forEach(function(btn) { | ||||
|             btn.addEventListener('click', function() { | ||||
|                 const storeName = this.closest('tr').querySelector('td:first-child').textContent; | ||||
|                 console.log('设置等级明细:', storeName); | ||||
|                 alert('设置 "' + storeName + '" 等级明细'); | ||||
|             }); | ||||
|         }); | ||||
|     </script> | ||||
| </body> | ||||
| </html> | ||||
		Loading…
	
		Reference in New Issue