38262-vm/index.php
Flatlogic Bot 5bfcb4a7af 拆分
2026-02-07 07:59:20 +00:00

146 lines
7.3 KiB
PHP

<?php
declare(strict_types=1);
@ini_set('display_errors', '1');
@error_reporting(E_ALL);
$projectName = $_SERVER['PROJECT_NAME'] ?? '号码分批大师';
?>
<!doctype html>
<html lang="zh-CN">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<title><?= htmlspecialchars($projectName) ?> - 智能号码去重分批工具</title>
<!-- Fonts & Icons -->
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=Inter:wght@400;600;700;800&display=swap" rel="stylesheet">
<script src="https://unpkg.com/lucide@latest"></script>
<!-- CSS -->
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/css/bootstrap.min.css" rel="stylesheet">
<link rel="stylesheet" href="assets/css/custom.css?v=<?= time() ?>">
</head>
<body>
<nav class="navbar">
<div class="container">
<a class="navbar-brand" href="/">
<i data-lucide="zap" fill="currentColor"></i>
<span><?= htmlspecialchars($projectName) ?></span>
</a>
<div class="d-flex align-items-center gap-3">
<span class="text-muted small d-none d-md-inline">隐私安全:数据不经过服务器</span>
<button class="btn btn-sm btn-light rounded-pill px-3" onclick="location.reload()">
<i data-lucide="refresh-cw" style="width: 14px;"></i> 重置
</button>
</div>
</div>
</nav>
<header class="hero-section container">
<h1>智能号码处理中心</h1>
<p>支持万级号码一键去重、灵活分批。专注效率,保护隐私。</p>
</header>
<main class="container pb-5">
<div class="row g-4">
<!-- Left: Input Area -->
<div class="col-lg-7">
<div class="card h-100 border-0">
<div class="card-body p-4 p-md-5">
<div class="d-flex justify-content-between align-items-center mb-4">
<h4 class="fw-bold mb-0">1. 输入号码</h4>
<div class="form-check form-switch mb-0">
<input class="form-check-input" type="checkbox" id="autoDedupe" checked>
<label class="form-check-label small fw-bold" for="autoDedupe">自动去重</label>
</div>
</div>
<div id="dropzone" class="dropzone mb-4">
<i data-lucide="upload-cloud"></i>
<h5 class="fw-bold">点击或拖拽上传文件</h5>
<p class="text-muted small mb-0">支持 TXT, CSV 等文本格式内容提取</p>
<input type="file" id="fileInput" class="d-none">
</div>
<div class="mb-4">
<textarea id="numberInput" class="form-control" rows="12" placeholder="在此粘贴号码列表(每行一个或任意分隔符),系统会自动识别..."></textarea>
</div>
<div class="stats-row">
<div class="stat-item">
<div class="stat-label">识别总数</div>
<div class="stat-value" id="totalCount">0</div>
</div>
<div class="stat-item">
<div class="stat-label">处理后数量</div>
<div class="stat-value text-primary" id="uniqueCount">0</div>
</div>
</div>
</div>
</div>
</div>
<!-- Right: Settings & Results -->
<div class="col-lg-5">
<div class="sticky-panel">
<div class="card border-0 mb-4">
<div class="card-body p-4 p-md-5">
<h4 class="fw-bold mb-4">2. 拆分配置</h4>
<div class="mb-4">
<label class="form-label small fw-bold text-muted text-uppercase">分批模式</label>
<select id="splitMode" class="form-select border-2">
<option value="count">按分批份数 (平均分配或指定分配)</option>
<option value="size">按每批固定额度 (每份 X 条)</option>
</select>
</div>
<div class="mb-4">
<label class="form-label small fw-bold text-muted text-uppercase">分批数值</label>
<div class="input-group">
<input type="number" id="splitValue" class="form-control border-2" value="2" min="1">
<span class="input-group-text bg-light border-2 fw-bold" id="unitText">份</span>
</div>
</div>
<!-- Dynamic Inputs -->
<div id="dynamicCountsContainer" class="mb-4 d-none">
<label class="form-label small fw-bold text-muted text-uppercase mb-3">指定前 N-1 份的数量(末份自动补足)</label>
<div id="dynamicInputsList"></div>
</div>
<button id="splitBtn" class="btn btn-primary w-100 py-3 fs-5">
<i data-lucide="scissors" class="me-2"></i> 开始智能拆分
</button>
</div>
</div>
<div id="resultsWrapper" class="mt-4">
<div class="d-flex justify-content-between align-items-center mb-3">
<h4 class="fw-bold mb-0">3. 处理结果</h4>
<span id="batchCountBadge" class="badge bg-primary rounded-pill d-none">0 个批次</span>
</div>
<div id="resultsContainer">
<div class="text-center py-5 text-muted bg-white rounded-4 border">
<i data-lucide="inbox" style="width: 48px; height: 48px; opacity: 0.2;" class="mb-2"></i>
<p class="small mb-0">等待拆分结果...</p>
</div>
</div>
</div>
</div>
</div>
</div>
</main>
<footer class="container py-5 text-center text-muted small border-top mt-5">
<p class="mb-0">&copy; <?= date('Y') ?> <?= htmlspecialchars($projectName) ?>. 本工具完全在您的浏览器中运行,绝不上传任何隐私数据。</p>
</footer>
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/js/bootstrap.bundle.min.js"></script>
<script>lucide.createIcons();</script>
<script src="assets/js/main.js?v=<?= time() ?>"></script>
</body>
</html>