From 405dc49f690cc53d473acf0db175f524f6cf7417 Mon Sep 17 00:00:00 2001
From: lxf <1371462558@qq.com>
Date: Thu, 19 Jun 2025 15:22:16 +0800
Subject: [PATCH] 修改算法
---
src/request/index.js | 16 ++++++++--------
1 files changed, 8 insertions(+), 8 deletions(-)
diff --git a/src/request/index.js b/src/request/index.js
index 281011a..453431a 100644
--- a/src/request/index.js
+++ b/src/request/index.js
@@ -16,7 +16,7 @@
// 创建
const request = axios.create({
baseURL: baseUrl,
- timeout: 8000, // 超时时间
+ timeout: 8000000, // 超时时间
// withCredentials: true,
headers: {
'Content-Type': 'application/json;charset=UTF-8',
@@ -28,7 +28,7 @@
// 拦截请求
request.interceptors.request.use(config => {
if (config.loading) {
- Toast.loading({ duration: 0, forbidClick: true })
+ // Toast.loading({ duration: 0, forbidClick: true })
}
//if (store?.state?.user?.userInfo?.token) {
if (store.state.user.userInfo.token != undefined && store.state.user.userInfo.token !== '') {
@@ -60,7 +60,7 @@
// 拦截响应
request.interceptors.response.use(res => { // 200开头的
if (res.config.loading) {
- Toast.clear()
+ // Toast.clear()
}
// console.log(res);
@@ -81,17 +81,17 @@
// break;
default:
if (msg != undefined) {
- Toast.fail({
- // icon: 'none',
- message: i18n.t(msg)
- });
+ // Toast.fail({
+ // // icon: 'none',
+ // message: i18n.t(msg)
+ // });
}
//console.log('错误')
return Promise.reject(res.data)
}
}, error => {
if (error.code == 'ERR_NETWORK') {
- Toast({ message: 'ERR_NETWORK', type: 'fail', duration: 1000 })
+ // Toast({ message: 'ERR_NETWORK', type: 'fail', duration: 1000 })
} else if (error.code == 'ECONNABORTED') {
//Toast({ message: 'Network Timeout', type: 'fail', duration: 2000 })
return Promise.reject(error);
--
Gitblit v1.9.3