From 42340e38d0463b376cdf5ad2a5084a5d160577ba Mon Sep 17 00:00:00 2001 From: yuping <82253452@qq.com> Date: Wed, 14 Dec 2022 20:36:37 +0800 Subject: [PATCH] -- bug --- .env | 10 ++++++++++ .env.boe | 8 ++++++++ .env.prod | 8 ++++++++ .env.release | 8 ++++++++ .env.test | 9 +++++++++ src/api/config.js | 2 +- src/components/project/OrgClass.vue | 8 ++------ src/router/index.js | 2 +- vue.config.js | 31 +++++++++++++++-------------- 9 files changed, 63 insertions(+), 23 deletions(-) create mode 100644 .env create mode 100644 .env.boe create mode 100644 .env.prod create mode 100644 .env.release create mode 100644 .env.test diff --git a/.env b/.env new file mode 100644 index 00000000..78d58245 --- /dev/null +++ b/.env @@ -0,0 +1,10 @@ +VITE_BASE=/manage +VITE_BASE_API=/ +VITE_PROXY_URL=http://111.231.196.214:30001/ + + +VITE_BOE_ONLINE_CLASS_URL=https://u-pre.boe.com/pc/course/studyindex?id= +VITE_BOE_CASS_DETAIL_URL=https://u-pre.boe.com/pc/case/detail?id= +VITE_BOE_TEST_DETAIL_URL=https://u-pre.boe.com/web/quizsummary?detailId= + +VITE_BOE_API_URL=https://u-pre.boe.com \ No newline at end of file diff --git a/.env.boe b/.env.boe new file mode 100644 index 00000000..20656803 --- /dev/null +++ b/.env.boe @@ -0,0 +1,8 @@ +VITE_BASE=/fe-student +VITE_BASE_API=/manageApi + +VITE_BOE_ONLINE_CLASS_URL=https://u-pre.boe.com/pc/course/studyindex?id= +VITE_BOE_CASS_DETAIL_URL=https://u-pre.boe.com/pc/case/detail?id= +VITE_BOE_TEST_DETAIL_URL=https://u-pre.boe.com/web/quizsummary?detailId= + +VITE_BOE_API_URL=https://u-pre.boe.com \ No newline at end of file diff --git a/.env.prod b/.env.prod new file mode 100644 index 00000000..6671831e --- /dev/null +++ b/.env.prod @@ -0,0 +1,8 @@ +VITE_BASE=/fe-student-release +VITE_BASE_API=/manageApi-release + +VITE_BOE_ONLINE_CLASS_URL=https://u.boe.com/pc-release/course/studyindex?id= +VITE_BOE_CASS_DETAIL_URL=https://u.boe.com/pc-release/case/detail?id= +VITE_BOE_TEST_DETAIL_URL=https://u.boe.com/web/quizsummary?detailId= + +VITE_BOE_API_URL=https://u.boe.com \ No newline at end of file diff --git a/.env.release b/.env.release new file mode 100644 index 00000000..6671831e --- /dev/null +++ b/.env.release @@ -0,0 +1,8 @@ +VITE_BASE=/fe-student-release +VITE_BASE_API=/manageApi-release + +VITE_BOE_ONLINE_CLASS_URL=https://u.boe.com/pc-release/course/studyindex?id= +VITE_BOE_CASS_DETAIL_URL=https://u.boe.com/pc-release/case/detail?id= +VITE_BOE_TEST_DETAIL_URL=https://u.boe.com/web/quizsummary?detailId= + +VITE_BOE_API_URL=https://u.boe.com \ No newline at end of file diff --git a/.env.test b/.env.test new file mode 100644 index 00000000..6f9f2122 --- /dev/null +++ b/.env.test @@ -0,0 +1,9 @@ +VITE_BASE=/fe-student +VITE_BASE_API=/manageApi + + +VITE_BOE_ONLINE_CLASS_URL=https://u.boe.com/pc-release/course/studyindex?id= +VITE_BOE_CASS_DETAIL_URL=https://u-pre.boe.com/pc/case/detail?id= +VITE_BOE_TEST_DETAIL_URL=https://u-pre.boe.com/web/quizsummary?detailId= + +VITE_BOE_API_URL=https://u-pre.boe.com \ No newline at end of file diff --git a/src/api/config.js b/src/api/config.js index ec213068..a8df7617 100644 --- a/src/api/config.js +++ b/src/api/config.js @@ -16,7 +16,7 @@ import axios from "axios"; axios.defaults.withCredentials = true; const http = axios.create({ - baseURL: "/manageApi", + baseURL: process.env.VITE_BASE_API, timeout: 1000 * 15, // headers: { "Content-Type": "multipart/form-data" }, headers: { "Content-Type": "application/json" }, diff --git a/src/components/project/OrgClass.vue b/src/components/project/OrgClass.vue index 72c82170..916f7cc2 100644 --- a/src/components/project/OrgClass.vue +++ b/src/components/project/OrgClass.vue @@ -23,7 +23,7 @@