-- 环境更改

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);
}

View File

@@ -276,9 +276,9 @@ const commonData = {
const organizationalTree = []
//嵌套页面
const iframeUrl = process.env.VITE_IFRAME_URL
const iframeUrl = process.env.VUE_APP_IFRAME_URL
//学员端路由
const studentUrl = process.env.VITE_IFRAME_STUDENT_URL
const studentUrl = process.env.VUE_APP_IFRAME_STUDENT_URL
//二维码
const codeUrl = "https://u-pre.boe.com"