diff --git a/new_web/merchant/css/member-detail.css b/new_web/merchant/css/member-detail.css deleted file mode 100644 index 39c2967..0000000 --- a/new_web/merchant/css/member-detail.css +++ /dev/null @@ -1,339 +0,0 @@ -/* 会员详情页面样式 */ - -.detail-header { - display: flex; - align-items: center; - justify-content: space-between; - margin-bottom: 24px; - padding-bottom: 16px; - border-bottom: 1px solid #e5e7eb; -} - -.close-btn { - display: flex; - align-items: center; - gap: 8px; - padding: 8px 16px; - background: #f3f4f6; - border: 1px solid #d1d5db; - border-radius: 6px; - color: #374151; - text-decoration: none; - font-size: 14px; - cursor: pointer; - transition: all 0.2s ease; -} - -.close-btn:hover { - background: #e5e7eb; - border-color: #9ca3af; -} - -.detail-header h2 { - margin: 0; - color: #1f2937; - font-size: 20px; - font-weight: 600; -} - -/* 会员信息卡片 */ -.member-info-card { - background: white; - border: 1px solid #e5e7eb; - border-radius: 8px; - margin-bottom: 24px; - overflow: hidden; -} - -.member-info-header { - padding: 16px 20px; - background: #f9fafb; - border-bottom: 1px solid #e5e7eb; -} - -.member-info-header h3 { - margin: 0; - color: #1f2937; - font-size: 16px; - font-weight: 600; -} - -.member-info-content { - padding: 20px; - display: flex; - justify-content: space-between; - align-items: flex-start; - gap: 40px; -} - -.member-basic { - flex: 1; -} - -.member-avatar-section { - display: flex; - align-items: flex-start; - gap: 16px; -} - -.large-avatar { - width: 80px; - height: 80px; - font-size: 32px; - font-weight: 600; -} - -.member-basic-info { - flex: 1; -} - -.member-name { - font-size: 18px; - font-weight: 600; - color: #1f2937; - margin-bottom: 8px; -} - -.member-id, -.member-phone, -.member-birth { - font-size: 14px; - color: #6b7280; - margin-bottom: 6px; -} - -.member-assets { - display: flex; - gap: 24px; -} - -.asset-item { - display: flex; - align-items: center; - gap: 12px; - padding: 16px; - background: #f8fafc; - border-radius: 8px; - min-width: 140px; -} - -.asset-icon { - width: 32px; - height: 32px; - border-radius: 50%; - display: flex; - align-items: center; - justify-content: center; - position: relative; -} - -.growth-icon { - background: #dbeafe; -} - -.growth-icon::before { - content: '📈'; - font-size: 16px; -} - -.points-icon { - background: #dcfce7; -} - -.points-icon::before { - content: '💰'; - font-size: 16px; -} - -.coupon-icon { - background: #fef3c7; -} - -.coupon-icon::before { - content: '🎫'; - font-size: 16px; -} - -.asset-info { - flex: 1; -} - -.asset-label { - font-size: 12px; - color: #6b7280; - margin-bottom: 4px; -} - -.asset-value { - font-size: 18px; - font-weight: 600; - color: #1f2937; -} - -/* 详情标签页 */ -.detail-tabs { - background: white; - border: 1px solid #e5e7eb; - border-radius: 8px; - overflow: hidden; -} - -.tab-headers { - display: flex; - background: #f9fafb; - border-bottom: 1px solid #e5e7eb; -} - -.tab-header { - flex: 1; - padding: 16px 20px; - background: none; - border: none; - color: #6b7280; - font-size: 14px; - font-weight: 500; - cursor: pointer; - transition: all 0.2s ease; - position: relative; -} - -.tab-header.active { - color: #2563eb; - background: white; -} - -.tab-header.active::after { - content: ''; - position: absolute; - bottom: 0; - left: 0; - right: 0; - height: 2px; - background: #2563eb; -} - -.tab-header:hover:not(.active) { - color: #374151; - background: #f3f4f6; -} - -.tab-content { - display: none; - padding: 20px; -} - -.tab-content.active { - display: block; -} - -/* 详情表格 */ -.detail-table { - width: 100%; - border-collapse: collapse; - margin-bottom: 16px; -} - -.detail-table th { - background: #f9fafb; - padding: 12px 16px; - text-align: left; - font-size: 14px; - font-weight: 600; - color: #374151; - border-bottom: 1px solid #e5e7eb; -} - -.detail-table td { - padding: 12px 16px; - font-size: 14px; - color: #6b7280; - border-bottom: 1px solid #f3f4f6; -} - -.detail-table tr:hover { - background: #f9fafb; -} - -.positive { - color: #059669; - font-weight: 600; -} - -.negative { - color: #dc2626; - font-weight: 600; -} - -.detail-link { - color: #2563eb; - text-decoration: none; - font-size: 13px; -} - -.detail-link:hover { - text-decoration: underline; -} - -/* 表格底部 */ -.table-footer { - display: flex; - justify-content: space-between; - align-items: center; - padding: 16px 0; - font-size: 14px; - color: #6b7280; - border-top: 1px solid #f3f4f6; -} - -.table-pagination { - display: flex; - align-items: center; - gap: 16px; -} - -.table-pagination span { - cursor: pointer; - padding: 4px 8px; - border-radius: 4px; - transition: background 0.2s ease; -} - -.table-pagination span:hover { - background: #f3f4f6; -} - -/* 响应式设计 */ -@media (max-width: 768px) { - .member-info-content { - flex-direction: column; - gap: 20px; - } - - .member-assets { - flex-direction: column; - gap: 12px; - } - - .asset-item { - min-width: auto; - } - - .tab-headers { - flex-direction: column; - } - - .detail-table { - font-size: 12px; - } - - .detail-table th, - .detail-table td { - padding: 8px 12px; - } - - .table-footer { - flex-direction: column; - gap: 12px; - align-items: flex-start; - } -} \ No newline at end of file diff --git a/new_web/merchant/css/member-view.css b/new_web/merchant/css/member-view.css deleted file mode 100644 index aa9fa46..0000000 --- a/new_web/merchant/css/member-view.css +++ /dev/null @@ -1,380 +0,0 @@ -/* 会员查看页面专用样式 */ - -/* 筛选区域样式 */ -.filter-section { - background: #fff; - padding: 20px; - margin-bottom: 20px; - border-radius: 8px; - box-shadow: 0 2px 4px rgba(0,0,0,0.1); -} - -.filter-row { - display: flex; - gap: 20px; - flex-wrap: wrap; - align-items: end; -} - -.filter-item { - display: flex; - flex-direction: column; - min-width: 150px; -} - -.filter-item label { - color: #666; - font-size: 14px; - margin-bottom: 5px; - font-weight: normal; -} - -.filter-item select, -.filter-item input { - padding: 8px 12px; - border: 1px solid #ddd; - border-radius: 4px; - font-size: 14px; - min-height: 36px; -} - -.filter-item input::placeholder { - color: #999; -} - -.filter-actions { - margin-top: 15px; -} - -.filter-actions .btn { - background: #10b981; - color: white; - border: none; - padding: 8px 20px; - border-radius: 4px; - cursor: pointer; - font-size: 14px; -} - -.filter-actions .btn:hover { - background: #059669; -} - -/* 统计信息样式 */ -.stats-section { - display: flex; - gap: 20px; - margin-bottom: 20px; -} - -.stats-item { - background: #fff; - padding: 20px; - border-radius: 8px; - box-shadow: 0 2px 4px rgba(0,0,0,0.1); - display: flex; - align-items: center; - gap: 15px; - min-width: 200px; -} - -.stats-icon { - width: 40px; - height: 40px; - border-radius: 50%; - display: flex; - align-items: center; - justify-content: center; - position: relative; -} - -.member-icon { - background: rgba(59, 130, 246, 0.1); -} - -.member-icon::before { - content: "👥"; - font-size: 20px; -} - -.new-member-icon { - background: rgba(16, 185, 129, 0.1); -} - -.new-member-icon::before { - content: "✨"; - font-size: 18px; -} - -.stats-content { - flex: 1; -} - -.stats-label { - color: #666; - font-size: 14px; - margin-bottom: 4px; -} - -.stats-value { - color: #333; - font-size: 24px; - font-weight: bold; -} - -/* 表格容器样式 */ -.table-container { - background: #fff; - border-radius: 8px; - box-shadow: 0 2px 4px rgba(0,0,0,0.1); - overflow: hidden; - margin-bottom: 20px; -} - -/* 会员表格样式 */ -.member-table { - width: 100%; - border-collapse: collapse; - font-size: 14px; -} - -.member-table thead { - background: #f8fafc; -} - -.member-table th { - padding: 12px 16px; - text-align: left; - font-weight: 500; - color: #374151; - border-bottom: 1px solid #e5e7eb; - position: relative; -} - -.member-table th:first-child { - width: 40px; - text-align: center; -} - -.member-table td { - padding: 12px 16px; - border-bottom: 1px solid #f3f4f6; - vertical-align: middle; -} - -.member-table td:first-child { - text-align: center; -} - -.member-table tbody tr:hover { - background-color: #f9fafb; -} - -/* 排序图标样式 */ -.sort-icon { - color: #9ca3af; - margin-left: 4px; - cursor: pointer; - user-select: none; -} - -.sort-icon:hover { - color: #374151; -} - -/* 头像样式 */ -.avatar { - width: 32px; - height: 32px; - border-radius: 50%; - display: inline-flex; - align-items: center; - justify-content: center; - color: white; - font-weight: 500; - font-size: 14px; -} - -.green-avatar { - background: #10b981; -} - -.orange-avatar { - background: #f59e0b; -} - -.red-avatar { - background: #ef4444; -} - -.purple-avatar { - background: #8b5cf6; -} - -.pink-avatar { - background: #ec4899; -} - -.blue-avatar { - background: #3b82f6; -} - -/* 等级徽章样式 */ -.level-badge { - padding: 4px 8px; - border-radius: 12px; - font-size: 12px; - font-weight: 500; - text-align: center; - min-width: 36px; - display: inline-block; -} - -.level-badge.lv1 { - background: #fef3c7; - color: #92400e; -} - -.level-badge.lv2 { - background: #ddd6fe; - color: #6b21a8; -} - -.level-badge.lv3 { - background: #fecaca; - color: #991b1b; -} - -.level-badge.lv4 { - background: #a7f3d0; - color: #065f46; -} - -/* 详情链接样式 */ -.detail-link { - color: #10b981; - text-decoration: none; - font-size: 14px; -} - -.detail-link:hover { - color: #059669; - text-decoration: underline; -} - -/* 分页样式 */ -.pagination-section { - background: #fff; - padding: 15px 20px; - border-radius: 8px; - box-shadow: 0 2px 4px rgba(0,0,0,0.1); - display: flex; - justify-content: space-between; - align-items: center; - flex-wrap: wrap; - gap: 15px; -} - -.pagination-info { - color: #666; - font-size: 14px; - display: flex; - align-items: center; - gap: 8px; -} - -.pagination-info select { - padding: 4px 8px; - border: 1px solid #ddd; - border-radius: 4px; - font-size: 14px; -} - -.pagination-controls { - display: flex; - align-items: center; - gap: 12px; - color: #666; - font-size: 14px; -} - -.pagination-controls span { - cursor: pointer; - padding: 4px 8px; - border-radius: 4px; - transition: background-color 0.2s; -} - -.pagination-controls span:hover { - background: #f3f4f6; - color: #374151; -} - -.pagination-controls input { - width: 50px; - padding: 4px 8px; - border: 1px solid #ddd; - border-radius: 4px; - text-align: center; - font-size: 14px; -} - -/* 复选框样式优化 */ -input[type="checkbox"] { - width: 16px; - height: 16px; - cursor: pointer; -} - -/* 响应式设计 */ -@media (max-width: 1200px) { - .filter-row { - gap: 15px; - } - - .filter-item { - min-width: 120px; - } - - .stats-section { - flex-wrap: wrap; - } - - .stats-item { - min-width: 180px; - } -} - -@media (max-width: 768px) { - .filter-row { - flex-direction: column; - gap: 15px; - } - - .filter-item { - min-width: auto; - width: 100%; - } - - .stats-section { - flex-direction: column; - } - - .stats-item { - min-width: auto; - } - - .member-table { - font-size: 12px; - } - - .member-table th, - .member-table td { - padding: 8px 12px; - } - - .pagination-section { - flex-direction: column; - text-align: center; - } -} \ No newline at end of file diff --git a/new_web/merchant/js/member-detail.js b/new_web/merchant/js/member-detail.js index f9deb98..9ab02cb 100644 --- a/new_web/merchant/js/member-detail.js +++ b/new_web/merchant/js/member-detail.js @@ -11,21 +11,8 @@ let currentMemberData = null; */ function initMemberDetail() { console.log('会员详情页面已初始化'); - loadMemberDetailCSS(); } -/** - * 加载会员详情页面专用CSS - */ -function loadMemberDetailCSS() { - if (!document.getElementById('memberDetailCSS')) { - const link = document.createElement('link'); - link.id = 'memberDetailCSS'; - link.rel = 'stylesheet'; - link.href = 'css/member-detail.css'; - document.head.appendChild(link); - } -} /** * 查看会员详情 - 从会员列表页面调用 @@ -98,8 +85,6 @@ async function createMemberDetailTab(tabTitle, memberData) { newContent.className = 'tab-content'; newContent.id = contentId; - // 先加载CSS样式 - loadMemberDetailCSS(); // 加载HTML内容 const response = await fetch('pages/member-detail.html'); diff --git a/new_web/merchant/js/member-view.js b/new_web/merchant/js/member-view.js index f25581a..d7a1abf 100644 --- a/new_web/merchant/js/member-view.js +++ b/new_web/merchant/js/member-view.js @@ -6,22 +6,10 @@ // 页面初始化函数(必需) function initMemberView() { console.log('会员查看页面已初始化'); - loadMemberViewCSS(); initMemberTable(); bindMemberEvents(); } -// 加载专用CSS -function loadMemberViewCSS() { - if (!document.getElementById('memberViewCSS')) { - const link = document.createElement('link'); - link.id = 'memberViewCSS'; - link.rel = 'stylesheet'; - link.href = 'css/member-view.css'; - document.head.appendChild(link); - } -} - // 初始化会员表格 function initMemberTable() { const selectAllCheckbox = document.getElementById('selectAll'); diff --git a/new_web/merchant/pages/member-detail.html b/new_web/merchant/pages/member-detail.html index 05edac9..ce38c29 100644 --- a/new_web/merchant/pages/member-detail.html +++ b/new_web/merchant/pages/member-detail.html @@ -335,4 +335,346 @@ - \ No newline at end of file + + + \ No newline at end of file diff --git a/new_web/merchant/pages/member-view.html b/new_web/merchant/pages/member-view.html index cb6e4b6..2397802 100644 --- a/new_web/merchant/pages/member-view.html +++ b/new_web/merchant/pages/member-view.html @@ -170,4 +170,387 @@ 尾页 - \ No newline at end of file + + + \ No newline at end of file