Commit 93b4a288 authored by “yiyousong”'s avatar “yiyousong”

pref:修改超时提示

parent d1edda7a
...@@ -6,7 +6,7 @@ import { Message } from "element-ui"; ...@@ -6,7 +6,7 @@ import { Message } from "element-ui";
import local from "@/utils/local"; import local from "@/utils/local";
// import router from "@/router" // import router from "@/router"
// 请求超时时间 // 请求超时时间
axios.defaults.timeout = 10 * 1000; // axios.defaults.timeout = 10 * 1000;
// 设置统一服务器地址 // 设置统一服务器地址
axios.defaults.baseURL = process.env.VUE_APP_API_BASE_URL; axios.defaults.baseURL = process.env.VUE_APP_API_BASE_URL;
...@@ -47,11 +47,11 @@ axios.interceptors.response.use( ...@@ -47,11 +47,11 @@ axios.interceptors.response.use(
return response; return response;
}, },
(err) => { (err) => {
if (err.message.includes("timeout")) { // if (err.message.includes("timeout")) {
Message.error({ // Message.error({
message: "请求超时,请稍后再试", // message: "请求超时,请稍后再试",
}); // });
} // }
return Promise.reject(err); return Promise.reject(err);
} }
); );
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment