This commit is contained in:
2026-04-25 15:14:22 +08:00
parent 6aca41d70e
commit 0124730063
9 changed files with 83 additions and 269 deletions

View File

@@ -1 +1 @@
VUE_APP_BASE_URL='http://154.12.94.229:8080/'
VUE_APP_BASE_URL='http://156.238.240.18:8081/'

View File

@@ -3,7 +3,7 @@
//const DEV_BASE_URL = "ws://1.92.85.51:8080";
const DEV_BASE_URL = "ws://127.0.0.1:8081";
const DEV_BASE_URL = "ws://156.238.240.18:8081";
export default {
BASE_API: DEV_BASE_URL,
};

View File

@@ -23,7 +23,7 @@ const reqAxios = axios.create({
//baseURL:'http://1.92.85.51:8080',
// baseURL:'http://3.92.67.237:8080',
baseURL:'http://127.0.0.1:8081/',
baseURL:'http://156.238.240.18:8081/',
// baseURL: "http://beecsgo.com/prod-api/",
// baseURL: "http://www.f2cs2.com/prod-api/",
@@ -95,11 +95,14 @@ reqAxios.interceptors.response.use(
// console.log('response',res)
vue.$hide();
if (res.data.code == 401) {
Message({
message: "登录已过期,请重新登陆",
type: "warning",
customClass: "log_warning",
});
const token = getToken();
if (token) {
Message({
message: "登录已过期,请重新登陆",
type: "warning",
customClass: "log_warning",
});
}
removeToken();
store.commit("LOGIN_IS_SHOW", true);
store.commit("ADVERT_IS_SHOW", true);
@@ -134,14 +137,17 @@ reqAxios.interceptors.response.use(
});
}
if (err.response.status == 401) {
const token = getToken();
if (token) {
Message({
message: "登录过期,请重新登陆",
type: "warning",
customClass: "log_warning",
});
}
removeToken();
store.commit("LOGIN_IS_SHOW", true);
store.commit("ADVERT_IS_SHOW", true);
Message({
message: "登录过期,请重新登陆",
type: "warning",
customClass: "log_warning",
});
}
}
);