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

pref:修改超时提示

parent d1edda7a
......@@ -6,7 +6,7 @@ import { Message } from "element-ui";
import local from "@/utils/local";
// import router from "@/router"
// 请求超时时间
axios.defaults.timeout = 10 * 1000;
// axios.defaults.timeout = 10 * 1000;
// 设置统一服务器地址
axios.defaults.baseURL = process.env.VUE_APP_API_BASE_URL;
......@@ -47,11 +47,11 @@ axios.interceptors.response.use(
return response;
},
(err) => {
if (err.message.includes("timeout")) {
Message.error({
message: "请求超时,请稍后再试",
});
}
// if (err.message.includes("timeout")) {
// Message.error({
// message: "请求超时,请稍后再试",
// });
// }
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