更新
This commit is contained in:
@@ -0,0 +1,139 @@
|
||||
<!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>
|
||||
:root {
|
||||
--bg: #0f1020;
|
||||
--accent: #8b5cf6;
|
||||
--accent2: #a855f7;
|
||||
--text: #e6e6f0;
|
||||
--muted: #9aa0c0;
|
||||
}
|
||||
* { box-sizing: border-box; margin: 0; padding: 0; }
|
||||
body {
|
||||
min-height: 100vh;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
background: radial-gradient(900px 500px at 50% -20%, #2a1c4a88, transparent), var(--bg);
|
||||
color: var(--text);
|
||||
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
|
||||
}
|
||||
.card {
|
||||
text-align: center;
|
||||
padding: 48px 56px;
|
||||
border-radius: 20px;
|
||||
border: 1px solid #2c2e4a;
|
||||
background: rgba(26, 27, 46, 0.92);
|
||||
box-shadow: 0 24px 80px rgba(0,0,0,.45);
|
||||
max-width: 420px;
|
||||
width: 90%;
|
||||
}
|
||||
.logo {
|
||||
width: 72px; height: 72px; margin: 0 auto 24px;
|
||||
border-radius: 18px;
|
||||
background: linear-gradient(135deg, var(--accent), var(--accent2));
|
||||
display: flex; align-items: center; justify-content: center;
|
||||
font-size: 34px;
|
||||
animation: pulse 2s ease-in-out infinite;
|
||||
}
|
||||
@keyframes pulse {
|
||||
0%, 100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(139,92,246,.4); }
|
||||
50% { transform: scale(1.04); box-shadow: 0 0 0 16px rgba(139,92,246,0); }
|
||||
}
|
||||
h1 { font-size: 22px; font-weight: 600; margin-bottom: 8px; }
|
||||
.sub { color: var(--muted); font-size: 14px; margin-bottom: 28px; line-height: 1.6; }
|
||||
.spinner {
|
||||
width: 44px; height: 44px; margin: 0 auto 20px;
|
||||
border: 3px solid #2c2e4a;
|
||||
border-top-color: var(--accent);
|
||||
border-radius: 50%;
|
||||
animation: spin .85s linear infinite;
|
||||
}
|
||||
@keyframes spin { to { transform: rotate(360deg); } }
|
||||
.status { font-size: 14px; color: #c4b5fd; min-height: 22px; margin-bottom: 12px; }
|
||||
.dots::after {
|
||||
content: '';
|
||||
animation: dots 1.5s steps(4, end) infinite;
|
||||
}
|
||||
@keyframes dots {
|
||||
0% { content: ''; }
|
||||
25% { content: '.'; }
|
||||
50% { content: '..'; }
|
||||
75% { content: '...'; }
|
||||
}
|
||||
.timer { font-size: 12px; color: var(--muted); }
|
||||
.bar-wrap {
|
||||
height: 4px; background: #1a1b2e; border-radius: 999px;
|
||||
overflow: hidden; margin-top: 20px;
|
||||
}
|
||||
.bar {
|
||||
height: 100%; width: 30%;
|
||||
background: linear-gradient(90deg, var(--accent), var(--accent2));
|
||||
border-radius: 999px;
|
||||
animation: slide 1.6s ease-in-out infinite;
|
||||
}
|
||||
@keyframes slide {
|
||||
0% { transform: translateX(-100%); }
|
||||
100% { transform: translateX(350%); }
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div class="card">
|
||||
<div class="logo">📱</div>
|
||||
<h1>抖音 IM 凭证采集器</h1>
|
||||
<p class="sub">程序已启动,正在准备操作界面<br/>准备好后会自动跳转;若未跳转请查看新打开的标签页</p>
|
||||
<div class="spinner"></div>
|
||||
<div class="status"><span id="msg">正在启动</span><span class="dots"></span></div>
|
||||
<div class="timer" id="timer">已等待 0 秒</div>
|
||||
<div class="bar-wrap"><div class="bar"></div></div>
|
||||
</div>
|
||||
<script>
|
||||
(function () {
|
||||
const PORTS = [8765, 8766, 8767, 8768, 8769, 8770, 8771, 8772, 8773, 8774];
|
||||
const msgs = [
|
||||
'正在启动',
|
||||
'正在加载组件',
|
||||
'正在准备浏览器',
|
||||
'即将进入操作界面'
|
||||
];
|
||||
let sec = 0;
|
||||
let portIdx = 0;
|
||||
let msgIdx = 0;
|
||||
|
||||
setInterval(function () {
|
||||
sec += 1;
|
||||
document.getElementById('timer').textContent = '已等待 ' + sec + ' 秒' +
|
||||
(sec > 15 ? '(首次启动可能较慢)' : '');
|
||||
if (sec % 4 === 0) {
|
||||
msgIdx = Math.min(msgIdx + 1, msgs.length - 1);
|
||||
document.getElementById('msg').textContent = msgs[msgIdx];
|
||||
}
|
||||
}, 1000);
|
||||
|
||||
function tryConnect() {
|
||||
const port = PORTS[portIdx % PORTS.length];
|
||||
const base = 'http://127.0.0.1:' + port;
|
||||
fetch(base + '/api/ping?t=' + Date.now(), { cache: 'no-store', mode: 'cors' })
|
||||
.then(function (r) { if (!r.ok) throw new Error('not ready'); return r.text(); })
|
||||
.then(function (t) { if (t.indexOf('ok') >= 0) go(base); else throw new Error('bad'); })
|
||||
.catch(function () {
|
||||
portIdx += 1;
|
||||
setTimeout(tryConnect, 450);
|
||||
});
|
||||
}
|
||||
|
||||
function go(base) {
|
||||
document.getElementById('msg').textContent = '启动完成,正在进入';
|
||||
location.replace(base + '/');
|
||||
}
|
||||
|
||||
setTimeout(tryConnect, 350);
|
||||
})();
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user