Explorar el Código

refactor(frontend): 调整请求超时时间

-将 HTTP 请求的超时时间从 5000 毫秒增加到 10000 毫秒
- 提高了请求的超时阈值,以适应可能的网络延迟或服务器响应缓慢情况
panqiuyao hace 3 meses
padre
commit
e187b1356d
Se han modificado 1 ficheros con 1 adiciones y 1 borrados
  1. 1 1
      frontend/src/utils/http.ts

+ 1 - 1
frontend/src/utils/http.ts

@@ -25,7 +25,7 @@ function loadingClose(requestId: string) {
  * 配置了请求拦截器和响应拦截器,支持加载动画和错误提示
  */
 const service = axios.create({
-    timeout: 5000, // 设置请求超时时间
+    timeout: 10000, // 设置请求超时时间
    // baseURL: '__API__',
 });
 console.log('__API__');