Conf(拦截器):设置超时时长为2分钟
This commit is contained in:
+2
-1
@@ -8,7 +8,7 @@ const http = new Request();
|
||||
/* 设置全局配置 */
|
||||
http.setConfig((config) => {
|
||||
config.baseURL = VUE_APP_API_URL;
|
||||
config.timeout = 2000;
|
||||
config.timeout = 2 * 60 * 1000;
|
||||
config.method = "POST";
|
||||
config.responseType = "text";
|
||||
config.header = {
|
||||
@@ -34,6 +34,7 @@ http.interceptors.response.use(
|
||||
return response;
|
||||
},
|
||||
(error) => {
|
||||
console.log(error)
|
||||
if (error.toString() == "Error: Network Error") {
|
||||
console.log("————————");
|
||||
console.log("发送请求失败", error);
|
||||
|
||||
Reference in New Issue
Block a user