feat(frontend):axios 超时 600s + 回忆对比分段加载文案
适配后台异步任务轮询模式: - axios 全局超时 180s → 600s(与 Java 后台 10min 轮询超时匹配) - 回忆对比加载提示改为分段文案: 0-3s: 正在提交 AI 任务… 3-60s: AI 对比分析中,请稍候… 60-180s: 内容较多,AI 正在深入分析… 180s+: 即将完成,请耐心等待…
This commit is contained in:
@@ -334,8 +334,10 @@ onMounted(() => {
|
|||||||
</el-button>
|
</el-button>
|
||||||
</div>
|
</div>
|
||||||
<p v-if="comparing" class="ai-waiting">
|
<p v-if="comparing" class="ai-waiting">
|
||||||
AI 正在对比分析中,已等待 {{ comparingSeconds }} 秒…
|
<template v-if="comparingSeconds < 3">正在提交 AI 任务…</template>
|
||||||
<template v-if="comparingSeconds > 30">内容较多,请耐心等待</template>
|
<template v-else-if="comparingSeconds < 60">AI 对比分析中,已等待 {{ comparingSeconds }} 秒,请稍候…</template>
|
||||||
|
<template v-else-if="comparingSeconds < 180">内容较多,AI 正在深入分析,已等待 {{ comparingSeconds }} 秒…</template>
|
||||||
|
<template v-else>即将完成,已等待 {{ comparingSeconds }} 秒,请耐心等待…</template>
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
<p class="panel-hint">
|
<p class="panel-hint">
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ const basic_url = import.meta.env.VITE_BASE_URL;
|
|||||||
|
|
||||||
const axiosInstance = axios.create({
|
const axiosInstance = axios.create({
|
||||||
baseURL: basic_url,
|
baseURL: basic_url,
|
||||||
timeout: 180000,
|
timeout: 600000,
|
||||||
withCredentials: true
|
withCredentials: true
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user