diff --git a/assets/css/custom.css b/assets/css/custom.css index 401e521..3bc0bf8 100644 --- a/assets/css/custom.css +++ b/assets/css/custom.css @@ -2,57 +2,64 @@ --primary-gold: #ffc107; --dark-gold: #e0a800; --light-gold: #ffdf7e; - --bg-light: #f4f7f6; - --text-dark: #1a202c; - --text-muted: #718096; + --bg-dark-deep: #0a0e14; + --glass-bg: rgba(255, 255, 255, 0.05); + --glass-border: rgba(255, 255, 255, 0.1); + --text-gold: #ffc107; --white: #ffffff; - --dark-bg: #111827; } -body { - background-color: var(--bg-light); - color: var(--text-dark); +body.bg-wealth { + background: radial-gradient(circle at top right, #1a202c, #0a0e14); + color: var(--white); font-family: 'Noto Sans SC', 'Inter', -apple-system, sans-serif; - font-size: 15px; - margin: 0; + min-height: 100vh; -webkit-font-smoothing: antialiased; } -/* Navbar */ -.navbar { - padding: 0.8rem 0; - background-color: var(--dark-bg) !important; +/* Glassmorphism Effects */ +.glass-nav { + background: rgba(10, 14, 20, 0.8) !important; + backdrop-filter: blur(10px); + border-bottom: 1px solid var(--glass-border); } -.logo-wrapper { - width: 52px; - height: 52px; - border-radius: 50%; - overflow: hidden; - border: 2px solid var(--primary-gold); - display: flex; - align-items: center; - justify-content: center; - background: #fff; +.glass-card { + background: var(--glass-bg); + backdrop-filter: blur(15px); + border: 1px solid var(--glass-border) !important; + border-radius: 24px !important; +} + +.icon-circle.bg-gold { + background: linear-gradient(135deg, var(--primary-gold), var(--dark-gold)); box-shadow: 0 0 15px rgba(255, 193, 7, 0.4); } -.logo-img { - width: 100%; - height: 100%; - object-fit: cover; +/* Navbar & Brand */ +.logo-wrapper { + display: flex; + align-items: center; + justify-content: center; + width: 45px; + height: 45px; + border-radius: 50%; + overflow: hidden; + border: 2px solid var(--primary-gold); + box-shadow: 0 0 20px rgba(255, 193, 7, 0.3); } .brand-text { - font-size: 1.45rem; - font-weight: 800 !important; - letter-spacing: -0.01em; - color: var(--white); - background: linear-gradient(135deg, #fff 30%, var(--primary-gold) 100%); + font-size: 1.4rem; + background: linear-gradient(135deg, #fff 40%, var(--primary-gold) 100%); -webkit-background-clip: text; -webkit-text-fill-color: transparent; } +.text-glow { + text-shadow: 0 0 10px rgba(255, 193, 7, 0.3); +} + /* Animations */ @keyframes rotating { from { transform: rotate(0deg); } @@ -60,140 +67,111 @@ body { } .rotating { - animation: rotating 8s linear infinite; + animation: rotating 15s linear infinite; } -/* Carousel Hero - Reduced Height */ +/* Carousel */ #mainCarousel { - border-radius: 20px; - overflow: hidden; + border: 1px solid var(--glass-border); +} + +.border-gold { + border: 2px solid var(--primary-gold) !important; } .hero-img { - height: 220px; /* Reduced to roughly half */ + height: 220px; object-fit: cover; - filter: brightness(0.55) contrast(1.1); -} - -.carousel-overlay { - position: absolute; - top: 0; - left: 0; - width: 100%; - height: 100%; - background: linear-gradient(to bottom, rgba(0,0,0,0.1) 0%, rgba(0,0,0,0.75) 100%); -} - -.carousel-caption { - bottom: 10%; - text-shadow: 0 2px 12px rgba(0,0,0,0.8); + filter: brightness(0.6); } .carousel-caption h2 { - font-size: 2rem !important; - margin-bottom: 0.25rem !important; -} - -.slogan-text { - font-weight: 400; - font-size: 1.1rem; - opacity: 0.95; - letter-spacing: 0.02em; -} - -/* Cards */ -.main-card { - border-radius: 16px !important; - border: 1px solid rgba(0,0,0,0.05) !important; - transition: transform 0.3s ease, box-shadow 0.3s ease; -} - -.main-card:hover { - box-shadow: 0 20px 40px rgba(0,0,0,0.08) !important; -} - -.icon-circle { - width: 45px; - height: 45px; - border-radius: 12px; - display: flex; - align-items: center; - justify-content: center; - font-size: 1.2rem; + font-size: 2.2rem !important; + text-shadow: 0 0 20px rgba(0,0,0,1); } /* Inputs & Outputs */ -textarea.form-control { - background-color: #fcfdfe; - border: 2px solid #edf2f7; - border-radius: 12px; - padding: 1.25rem; - font-size: 0.95rem; - line-height: 1.7; - resize: none; - color: #2d3748; - transition: all 0.2s ease; +.glass-input { + background: rgba(255, 255, 255, 0.03) !important; + border: 1px solid var(--glass-border) !important; + color: #fff !important; + border-radius: 12px !important; + transition: all 0.3s ease; } -textarea.form-control:focus { - background-color: #fff; - border-color: var(--primary-gold); - box-shadow: 0 0 0 4px rgba(255, 193, 7, 0.1); - outline: none; +.glass-input:focus { + background: rgba(255, 255, 255, 0.08) !important; + border-color: var(--primary-gold) !important; + box-shadow: 0 0 0 4px rgba(255, 193, 7, 0.1) !important; } -.result-container { - background-color: #f8fafc; - border: 2px dashed #e2e8f0 !important; - font-family: 'Inter', monospace; +.result-container-dark { + background: rgba(0, 0, 0, 0.3); + border: 1px dashed var(--glass-border); + color: var(--primary-gold); + font-family: 'Consolas', 'Monaco', monospace; white-space: pre-wrap; - line-height: 1.8; - font-size: 0.95rem; - color: #1a202c; + line-height: 2.2; + font-size: 1.1rem; } /* Buttons */ .btn-gold { background: linear-gradient(135deg, var(--primary-gold) 0%, var(--dark-gold) 100%); border: none; - color: #333; + color: #000; + border-radius: 12px; box-shadow: 0 8px 20px rgba(255, 193, 7, 0.3); transition: all 0.3s ease; } .btn-gold:hover { - background: linear-gradient(135deg, #ffca2c 0%, #d39e00 100%); - transform: translateY(-2px); - box-shadow: 0 10px 25px rgba(255, 193, 7, 0.45); + transform: translateY(-3px); + box-shadow: 0 12px 25px rgba(255, 193, 7, 0.5); color: #000; } -.btn-outline-danger { - border-width: 2px; - font-weight: 600; +.btn-gold-outline { + border: 1px solid var(--primary-gold); + color: var(--primary-gold); + border-radius: 8px; + transition: all 0.2s; +} + +.btn-gold-outline:hover { + background: var(--primary-gold); + color: #000; +} + +.text-light-muted { + color: rgba(255, 255, 255, 0.6); +} + +/* Footer & Logo */ +.bg-dark-deep { + background-color: #05070a; } -/* Footer */ .footer { - border-top: 4px solid var(--primary-gold); + border-top: 2px solid var(--glass-border); } .footer-logo { width: 60px; height: 60px; border-radius: 50%; + object-fit: cover; border: 2px solid var(--primary-gold); + box-shadow: 0 0 15px rgba(255, 193, 7, 0.4); } -/* Toast */ -.toast { - background-color: #111827 !important; +.text-gold { + color: var(--primary-gold) !important; } -/* Responsive fixes */ +/* Responsive */ @media (max-width: 768px) { - .hero-img { height: 180px; } - .carousel-caption h2 { font-size: 1.4rem !important; } - .slogan-text { font-size: 0.9rem; } - .display-5 { font-size: 1.8rem; } -} + .hero-img { height: 160px; } + .carousel-caption h2 { font-size: 1.5rem !important; } +}.logo-img { width: 100%; height: 100%; object-fit: cover; display: block; } +.marked-label { font-weight: 800 !important; font-size: 0.95rem !important; letter-spacing: 0.5px; text-shadow: 0 0 10px rgba(255, 193, 7, 0.4); } diff --git a/assets/js/main.js b/assets/js/main.js index 1a07a9d..d2ed29a 100644 --- a/assets/js/main.js +++ b/assets/js/main.js @@ -1,7 +1,6 @@ document.addEventListener('DOMContentLoaded', () => { // Elements const clockEl = document.getElementById('real-time-clock'); - const inputEl = document.getElementById('reportInput'); const outputEl = document.getElementById('reportOutput'); const btnParse = document.getElementById('btnParse'); const btnClear = document.getElementById('btnClear'); @@ -10,6 +9,26 @@ document.addEventListener('DOMContentLoaded', () => { const toastEl = document.getElementById('liveToast'); const toast = new bootstrap.Toast(toastEl); + // Input Elements Mapping + const inputs = { + totalWS: document.getElementById('in_totalWS'), + wsBanned: document.getElementById('in_wsBanned'), + wsPermBanned: document.getElementById('in_wsPermBanned'), + totalXHS: document.getElementById('in_totalXHS'), + totalSMS: document.getElementById('in_totalSMS'), + xhs: document.getElementById('in_xhs'), + xhs_reply: document.getElementById('in_xhs_reply'), + ws: document.getElementById('in_ws'), + ws_reply: document.getElementById('in_ws_reply'), + sms: document.getElementById('in_sms'), + sms_reply: document.getElementById('in_sms_reply'), + totalGreeting: document.getElementById('in_totalGreeting'), + totalReply: document.getElementById('in_totalReply'), + rechat: document.getElementById('in_rechat'), + traffic: document.getElementById('in_traffic'), + voice: document.getElementById('in_voice') + }; + // Initialize Real-time Clock const updateClock = () => { const now = new Date(); @@ -18,7 +37,6 @@ document.addEventListener('DOMContentLoaded', () => { hour: '2-digit', minute: '2-digit', second: '2-digit', hour12: false }; - // Format to YYYY-MM-DD HH:mm:ss const formatted = now.toLocaleString('zh-CN', options).replace(/\//g, '-'); clockEl.textContent = formatted; }; @@ -33,106 +51,57 @@ document.addEventListener('DOMContentLoaded', () => { toast.show(); }; - // Parsing Logic - const parseReports = () => { - const text = inputEl.value.trim(); - if (!text) { - showToast('请在左侧粘贴报表内容!', true); + // Parsing Logic (now just reading inputs) + const generateReport = () => { + const stats = {}; + let hasValue = false; + + for (const [key, el] of Object.entries(inputs)) { + const val = parseInt(el.value, 10) || 0; + stats[key] = val; + if (el.value !== '') hasValue = true; + } + + if (!hasValue) { + showToast('请至少填入一项数据!', true); return; } - // Define stats object to hold sums - const stats = { - '总WS数量': 0, - 'WS今日封号': 0, - '总永封WS': 0, - '总XHS数量': 0, - '总SMS数量': 0, - 'XHS': 0, - 'XHS回复': 0, - 'WS': 0, - 'WS回复': 0, - 'SMS': 0, - 'SMS回复': 0, - '总招呼量': 0, - '总回复': 0, - '再聊': 0, - '引流': 0, - '语音': 0 - }; - - // Standard single value patterns - const singlePatterns = { - '总WS数量': /总WS数量[::]\s*(\d+)/g, - 'WS今日封号': /WS今日封号[::]\s*(\d+)/g, - '总永封WS': /总永封WS[::]\s*(\d+)/g, - '总XHS数量': /总XHS数量[::]\s*(\d+)/g, - '总SMS数量': /总SMS数量[::]\s*(\d+)/g, - '总招呼量': /总招呼量[::]\s*(\d+)/g, - '总回复': /总回复[::]\s*(\d+)/g, - '再聊': /再聊[::]\s*(\d+)/g, - '引流': /引流[::]\s*(\d+)/g, - '语音': /语音[::]\s*(\d+)/g - }; - - // Dual value patterns (e.g., XHS: 10 回复: 5) - const dualPatterns = { - 'XHS': /XHS[::]\s*(\d+)\s*回复[::]\s*(\d+)/g, - 'WS': /WS[::]\s*(\d+)\s*回复[::]\s*(\d+)/g, - 'SMS': /SMS[::]\s*(\d+)\s*回复[::]\s*(\d+)/g - }; - - // Sum single fields - for (const [key, regex] of Object.entries(singlePatterns)) { - let match; - while ((match = regex.exec(text)) !== null) { - stats[key] += parseInt(match[1], 10) || 0; - } - } - - // Sum dual fields - for (const [key, regex] of Object.entries(dualPatterns)) { - let match; - while ((match = regex.exec(text)) !== null) { - stats[key] += parseInt(match[1], 10) || 0; - stats[key + '回复'] += parseInt(match[2], 10) || 0; - } - } - - // Format the output string exactly like the requested report structure - const result = -`总WS数量: ${stats['总WS数量']} -WS今日封号: ${stats['WS今日封号']} -总永封WS: ${stats['总永封WS']} -总XHS数量: ${stats['总XHS数量']} -总SMS数量: ${stats['总SMS数量']} -XHS: ${stats['XHS']} 回复: ${stats['XHS回复']} -WS: ${stats['WS']} 回复: ${stats['WS回复']} -SMS: ${stats['SMS']} 回复: ${stats['SMS回复']} -总招呼量: ${stats['总招呼量']} -总回复: ${stats['总回复']} -再聊: ${stats['再聊']} -引流: ${stats['引流']} -语音: ${stats['语音']}`; + // Generate output in the EXACT order and format requested + const result = `总WS数量: ${stats.totalWS} +WS今日封号: ${stats.wsBanned} +总永封WS: ${stats.wsPermBanned} +总XHS数量: ${stats.totalXHS} +总SMS数量: ${stats.totalSMS} +XHS招呼量: ${stats.xhs} 回复: ${stats.xhs_reply} +WS招呼量: ${stats.ws} 回复: ${stats.ws_reply} +SMS招呼量: ${stats.sms} 回复: ${stats.sms_reply} +总招呼量: ${stats.totalGreeting} +总回复: ${stats.totalReply} +再聊: ${stats.rechat} +引流: ${stats.traffic} +语音: ${stats.voice}`; outputEl.textContent = result; btnCopy.disabled = false; - showToast('解析统计成功,数据已汇总!'); + showToast('报表生成成功!'); }; // Events - btnParse.addEventListener('click', parseReports); + btnParse.addEventListener('click', generateReport); btnClear.addEventListener('click', () => { - inputEl.value = ''; - outputEl.textContent = '汇总结果将实时显示在此处...'; + for (const el of Object.values(inputs)) { + el.value = ''; + } + outputEl.textContent = '数据结果将在此处生成...'; btnCopy.disabled = true; showToast('已清空所有内容'); }); btnCopy.addEventListener('click', () => { const text = outputEl.textContent; - if (text && !text.includes('实时显示在此处')) { + if (text && !text.includes('在此处生成')) { navigator.clipboard.writeText(text).then(() => { showToast('汇总报表已复制到剪贴板!'); }).catch(err => { diff --git a/assets/pasted-20260224-091022-b19f7a99.png b/assets/pasted-20260224-091022-b19f7a99.png new file mode 100644 index 0000000..53bbfb9 Binary files /dev/null and b/assets/pasted-20260224-091022-b19f7a99.png differ diff --git a/assets/pasted-20260224-091300-ff3c2f74.png b/assets/pasted-20260224-091300-ff3c2f74.png new file mode 100644 index 0000000..fe73f6b Binary files /dev/null and b/assets/pasted-20260224-091300-ff3c2f74.png differ diff --git a/assets/pasted-20260224-092520-614ed853.png b/assets/pasted-20260224-092520-614ed853.png new file mode 100644 index 0000000..8cae98f Binary files /dev/null and b/assets/pasted-20260224-092520-614ed853.png differ diff --git a/index.php b/index.php index 19eaf8d..b3868bc 100644 --- a/index.php +++ b/index.php @@ -25,17 +25,16 @@ $logoPath = 'assets/pasted-20260224-085211-bb97e8b6.jpg'; -
+ -