更新跟价相关内容修改

This commit is contained in:
super
2026-04-20 00:41:49 +08:00
parent 7b12cebb45
commit dabb278170
19 changed files with 596 additions and 145 deletions

View File

@@ -871,8 +871,12 @@ async function refreshTaskDetails(taskIds?: number[]) {
if (changed) {
syncResultState()
}
} catch {
// ignore polling failures
} catch (error) {
const message = (error instanceof Error ? error.message : String(error || '')).toLowerCase()
const transient = ['无法连接到后端服务', 'bad gateway', 'gateway timeout', 'network error', 'timeout', '502', '503', '504'].some((pattern) => message.includes(pattern.toLowerCase()))
if (transient && chainStarted.value) {
queuePushResult.value = '当前任务运行中,正在等待后端服务恢复...'
}
}
}
@@ -1102,7 +1106,11 @@ async function loadHistory() {
await refreshTaskDetails()
ensurePolling(true)
} catch (err) {
console.error('loadHistory error:', err)
const message = (err instanceof Error ? err.message : String(err || '')).toLowerCase()
const transient = ['无法连接到后端服务', 'bad gateway', 'gateway timeout', 'network error', 'timeout', '502', '503', '504'].some((pattern) => message.includes(pattern.toLowerCase()))
if (!transient) {
console.error('loadHistory error:', err)
}
}
}