mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/fe-manage.git
synced 2025-12-08 10:26:44 +08:00
-- 环境更改
This commit is contained in:
12
.env
12
.env
@@ -1,8 +1,8 @@
|
|||||||
VITE_BASE=/manage
|
VUE_APP_BASE=/manage
|
||||||
VITE_BASE_API=/
|
VUE_APP_BASE_API=/manageApi
|
||||||
VITE_PROXY_URL=http://111.231.196.214:30001/
|
VUE_APP_PROXY_URL=http://111.231.196.214:30001/
|
||||||
VITE_LOGIN_URL=https://u-pre.boe.com/web
|
VUE_APP_LOGIN_URL=https://u-pre.boe.com/web
|
||||||
|
|
||||||
|
|
||||||
VITE_IFRAME_URL=https://u-pre.boe.com/pc-release/iframe
|
VUE_APP_IFRAME_URL=https://u-pre.boe.com/pc-release/iframe
|
||||||
VITE_IFRAME_STUDENT_URL=https://u-pre.boe.com/pc-release/loading
|
VUE_APP_IFRAME_STUDENT_URL=https://u-pre.boe.com/pc-release/loading
|
||||||
|
|||||||
4
.env.boe
4
.env.boe
@@ -1,4 +1,4 @@
|
|||||||
VITE_BASE=/manage
|
VUE_APP_BASE=/manage
|
||||||
VITE_BASE_API=/manageApi
|
VUE_APP_BASE_API=/manageApi
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -1,2 +1,2 @@
|
|||||||
VITE_BASE=/manage
|
VUE_APP_BASE=/manage
|
||||||
VITE_BASE_API=/manageApi
|
VUE_APP_BASE_API=/manageApi
|
||||||
10
.env.release
10
.env.release
@@ -1,7 +1,7 @@
|
|||||||
VITE_BASE=/manage-release
|
VUE_APP_BASE=/manage-release
|
||||||
VITE_BASE_API=/manageApi-release
|
VUE_APP_BASE_API=/manageApi-release
|
||||||
VITE_LOGIN_URL=https://u.boe.com/web
|
VUE_APP_LOGIN_URL=https://u.boe.com/web
|
||||||
|
|
||||||
|
|
||||||
VITE_IFRAME_URL=https://u-pre.boe.com/pc-release/iframe
|
VUE_APP_IFRAME_URL=https://u-pre.boe.com/pc-release/iframe
|
||||||
VITE_IFRAME_STUDENT_URL=https://u-pre.boe.com/pc-release/loading
|
VUE_APP_IFRAME_STUDENT_URL=https://u-pre.boe.com/pc-release/loading
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
VITE_BASE=/manage
|
VUE_APP_BASE=/manage
|
||||||
VITE_BASE_API=/manageApi
|
VUE_APP_BASE_API=/manageApi
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -17,7 +17,7 @@ import router from "@/router";
|
|||||||
|
|
||||||
axios.defaults.withCredentials = true;
|
axios.defaults.withCredentials = true;
|
||||||
const http = axios.create({
|
const http = axios.create({
|
||||||
baseURL: process.env.VITE_BASE_API,
|
baseURL: process.env.VUE_APP_BASE_API,
|
||||||
timeout: 1000 * 15,
|
timeout: 1000 * 15,
|
||||||
// headers: { "Content-Type": "multipart/form-data" },
|
// headers: { "Content-Type": "multipart/form-data" },
|
||||||
headers: { "Content-Type": "application/json" },
|
headers: { "Content-Type": "application/json" },
|
||||||
@@ -57,7 +57,7 @@ http.interceptors.response.use(
|
|||||||
return response;
|
return response;
|
||||||
} else {
|
} else {
|
||||||
if (code === 1000) {
|
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);
|
console.log("api %o", msg);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -276,9 +276,9 @@ const commonData = {
|
|||||||
const organizationalTree = []
|
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"
|
const codeUrl = "https://u-pre.boe.com"
|
||||||
|
|||||||
@@ -17,7 +17,7 @@ const routes = [
|
|||||||
...routesConfig
|
...routesConfig
|
||||||
]
|
]
|
||||||
const router = createRouter({
|
const router = createRouter({
|
||||||
history: createWebHistory(process.env.VITE_BASE),
|
history: createWebHistory(process.env.VUE_APP_BASE),
|
||||||
routes,
|
routes,
|
||||||
|
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -15,7 +15,7 @@ module.exports = defineConfig({
|
|||||||
port: 8080,
|
port: 8080,
|
||||||
proxy: {
|
proxy: {
|
||||||
"/manageApi": {
|
"/manageApi": {
|
||||||
target: process.env.VITE_PROXY_URL,
|
target: process.env.VUE_APP_PROXY_URL,
|
||||||
changeOrigin: true, //表示是否改变原域名
|
changeOrigin: true, //表示是否改变原域名
|
||||||
// secure: false,
|
// secure: false,
|
||||||
// ws: false, //表示WebSocket协议
|
// ws: false, //表示WebSocket协议
|
||||||
|
|||||||
Reference in New Issue
Block a user