| | |
| | | // 创建 |
| | | const request = axios.create({ |
| | | baseURL: baseUrl, |
| | | timeout: 8000, // 超时时间 |
| | | timeout: 8000000, // 超时时间 |
| | | // withCredentials: true, |
| | | headers: { |
| | | "Content-Type": "application/json;charset=UTF-8", |
| | |
| | | }, |
| | | (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); |