🧹 清理更多调试日志
- 移除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() {
|
function loadAccounts() {
|
||||||
console.log('[加载] 正在获取账号列表...');
|
|
||||||
fetch('/api/accounts')
|
fetch('/api/accounts')
|
||||||
.then(r => r.json())
|
.then(r => r.json())
|
||||||
.then(accountsList => {
|
.then(accountsList => {
|
||||||
console.log('[加载] 收到账号列表:', accountsList.length, '个账号');
|
|
||||||
accounts = {};
|
accounts = {};
|
||||||
accountsList.forEach(acc => { accounts[acc.id] = acc; });
|
accountsList.forEach(acc => { accounts[acc.id] = acc; });
|
||||||
renderAccounts();
|
renderAccounts();
|
||||||
updateAccountLimitDisplay();
|
updateAccountLimitDisplay();
|
||||||
})
|
|
||||||
.catch(err => {
|
|
||||||
console.error('[加载] 获取账号列表失败:', err);
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
document.addEventListener('DOMContentLoaded', function() {
|
document.addEventListener('DOMContentLoaded', function() {
|
||||||
@@ -750,30 +745,17 @@
|
|||||||
|
|
||||||
// ==================== Socket.IO ====================
|
// ==================== Socket.IO ====================
|
||||||
socket.on('connect', function() {
|
socket.on('connect', function() {
|
||||||
console.log('[Socket] WebSocket已连接,ID:', socket.id);
|
|
||||||
// 连接成功后主动加载一次账号列表(双重保险)
|
|
||||||
setTimeout(function() {
|
setTimeout(function() {
|
||||||
if (Object.keys(accounts).length === 0) {
|
if (Object.keys(accounts).length === 0) loadAccounts();
|
||||||
console.log('[Socket] WebSocket连接成功但无账号,主动加载...');
|
|
||||||
loadAccounts();
|
|
||||||
}
|
|
||||||
}, 500);
|
}, 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) {
|
socket.on('accounts_list', function(accountsList) {
|
||||||
console.log('[Socket] 收到accounts_list事件:', accountsList.length, '个账号');
|
|
||||||
accounts = {};
|
accounts = {};
|
||||||
accountsList.forEach(acc => { accounts[acc.id] = acc; });
|
accountsList.forEach(acc => { accounts[acc.id] = acc; });
|
||||||
renderAccounts();
|
renderAccounts();
|
||||||
updateAccountLimitDisplay();
|
updateAccountLimitDisplay();
|
||||||
});
|
});
|
||||||
socket.on('account_update', function(acc) {
|
socket.on('account_update', function(acc) {
|
||||||
console.log('[Socket] 收到account_update:', acc.id, acc.status, acc.detail_status);
|
|
||||||
accounts[acc.id] = acc;
|
accounts[acc.id] = acc;
|
||||||
updateAccountCard(acc);
|
updateAccountCard(acc);
|
||||||
updateRunningCount();
|
updateRunningCount();
|
||||||
@@ -1308,7 +1290,6 @@
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
const scheduleTime = hour.toString().padStart(2, '0') + ':' + minute.toString().padStart(2, '0');
|
const scheduleTime = hour.toString().padStart(2, '0') + ':' + minute.toString().padStart(2, '0');
|
||||||
console.log('[定时任务] 标准化时间:', scheduleTimeRaw, '->', scheduleTime);
|
|
||||||
|
|
||||||
const browseType = document.getElementById('scheduleBrowseType').value;
|
const browseType = document.getElementById('scheduleBrowseType').value;
|
||||||
const enableScreenshot = document.getElementById('scheduleScreenshot').checked ? 1 : 0;
|
const enableScreenshot = document.getElementById('scheduleScreenshot').checked ? 1 : 0;
|
||||||
|
|||||||
Reference in New Issue
Block a user