From 41487b9a8ad1353c21dd1ac2bfafcf8d1d4f34e4 Mon Sep 17 00:00:00 2001
From: xyc <jc_xiong@hotmail.com>
Date: 星期五, 28 八月 2026 17:09:47 +0800
Subject: [PATCH] feat: 所有前端 API 请求加超时保护,超时/网络异常优雅提示,不再无限 pending
---
traffic-audit-web/src/components/Captcha3D.vue | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/traffic-audit-web/src/components/Captcha3D.vue b/traffic-audit-web/src/components/Captcha3D.vue
index 0264cc7..d710b33 100644
--- a/traffic-audit-web/src/components/Captcha3D.vue
+++ b/traffic-audit-web/src/components/Captcha3D.vue
@@ -119,7 +119,7 @@
this.selectedIds = []
this.errorMsg = ''
this.$emit('reset')
- axios.get('/api/auth/captcha')
+ axios.get('/api/auth/captcha', { timeout: 10000 })
.then(res => {
this.loading = false
if (res.data.code === 200) {
@@ -176,7 +176,7 @@
axios.post('/api/auth/captcha/verify', {
captchaId: this.challenge.captchaId,
captchaClickIds: this.selectedIds.slice()
- })
+ }, { timeout: 10000 })
.then(res => {
this.loading = false
const d = res.data
--
Gitblit v1.9.1