Yansen 2 lat temu
rodzic
commit
a7a8f81d44
1 zmienionych plików z 3 dodań i 0 usunięć
  1. 3
    0
      src/utils/request.js

+ 3
- 0
src/utils/request.js Wyświetl plik

19
     noTip = method.toLocaleLowerCase() === 'get' ? true : false;
19
     noTip = method.toLocaleLowerCase() === 'get' ? true : false;
20
   }
20
   }
21
 
21
 
22
+  console.log('-----timeout---', download ? 600000 : 10000)
23
+
22
   // 在发送请求之前做些什么
24
   // 在发送请求之前做些什么
23
   return {
25
   return {
24
     ...config,
26
     ...config,
25
     silent: noTip,
27
     silent: noTip,
28
+    timeout: download ? 600000 : 10000,
26
     headers: {
29
     headers: {
27
       'Content-Type': 'application/json;charset=utf-8', // charset 防止乱码
30
       'Content-Type': 'application/json;charset=utf-8', // charset 防止乱码
28
       ...headers,
31
       ...headers,