-- 环境更改

This commit is contained in:
yuping
2022-12-14 21:21:58 +08:00
parent 62253c8be9
commit 12c3a1ce72
9 changed files with 23 additions and 23 deletions

View File

@@ -17,7 +17,7 @@ import router from "@/router";
axios.defaults.withCredentials = true;
const http = axios.create({
baseURL: process.env.VITE_BASE_API,
baseURL: process.env.VUE_APP_BASE_API,
timeout: 1000 * 15,
// headers: { "Content-Type": "multipart/form-data" },
headers: { "Content-Type": "application/json" },
@@ -57,7 +57,7 @@ http.interceptors.response.use(
return response;
} else {
if (code === 1000) {
process.env.NODE_ENV === 'development' ? router.push({ path: 'login' }) : (window.location.href = process.env.VITE_LOGIN_URL)
process.env.NODE_ENV === 'development' ? router.push({ path: 'login' }) : (window.location.href = process.env.VUE_APP_LOGIN_URL)
}
console.log("api %o", msg);
}