🧹 清理更多调试日志
- 移除Socket连接/断开/错误日志 - 移除账号加载日志 - 移除定时任务时间标准化日志 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -699,18 +699,13 @@
|
||||
|
||||
|
||||
function loadAccounts() {
|
||||
console.log('[加载] 正在获取账号列表...');
|
||||
fetch('/api/accounts')
|
||||
.then(r => r.json())
|
||||
.then(accountsList => {
|
||||
console.log('[加载] 收到账号列表:', accountsList.length, '个账号');
|
||||
accounts = {};
|
||||
accountsList.forEach(acc => { accounts[acc.id] = acc; });
|
||||
renderAccounts();
|
||||
updateAccountLimitDisplay();
|
||||
})
|
||||
.catch(err => {
|
||||
console.error('[加载] 获取账号列表失败:', err);
|
||||
});
|
||||
}
|
||||
document.addEventListener('DOMContentLoaded', function() {
|
||||
@@ -749,31 +744,18 @@
|
||||
}
|
||||
|
||||
// ==================== Socket.IO ====================
|
||||
socket.on('connect', function() {
|
||||
console.log('[Socket] WebSocket已连接,ID:', socket.id);
|
||||
// 连接成功后主动加载一次账号列表(双重保险)
|
||||
socket.on('connect', function() {
|
||||
setTimeout(function() {
|
||||
if (Object.keys(accounts).length === 0) {
|
||||
console.log('[Socket] WebSocket连接成功但无账号,主动加载...');
|
||||
loadAccounts();
|
||||
}
|
||||
if (Object.keys(accounts).length === 0) loadAccounts();
|
||||
}, 500);
|
||||
});
|
||||
socket.on('disconnect', function(reason) {
|
||||
console.log('[Socket] 断开连接,原因:', reason);
|
||||
});
|
||||
socket.on('connect_error', function(error) {
|
||||
console.error('[Socket] 连接错误:', error);
|
||||
});
|
||||
socket.on('accounts_list', function(accountsList) {
|
||||
console.log('[Socket] 收到accounts_list事件:', accountsList.length, '个账号');
|
||||
accounts = {};
|
||||
accountsList.forEach(acc => { accounts[acc.id] = acc; });
|
||||
renderAccounts();
|
||||
updateAccountLimitDisplay();
|
||||
});
|
||||
socket.on('account_update', function(acc) {
|
||||
console.log('[Socket] 收到account_update:', acc.id, acc.status, acc.detail_status);
|
||||
accounts[acc.id] = acc;
|
||||
updateAccountCard(acc);
|
||||
updateRunningCount();
|
||||
@@ -1308,7 +1290,6 @@
|
||||
return;
|
||||
}
|
||||
const scheduleTime = hour.toString().padStart(2, '0') + ':' + minute.toString().padStart(2, '0');
|
||||
console.log('[定时任务] 标准化时间:', scheduleTimeRaw, '->', scheduleTime);
|
||||
|
||||
const browseType = document.getElementById('scheduleBrowseType').value;
|
||||
const enableScreenshot = document.getElementById('scheduleScreenshot').checked ? 1 : 0;
|
||||
|
||||
Reference in New Issue
Block a user