diff --git a/.env b/.env new file mode 100644 index 00000000..06a891d8 --- /dev/null +++ b/.env @@ -0,0 +1,11 @@ +VITE_BASE=/manage +VITE_BASE_API=/ +VITE_PROXY_URL=http://111.231.196.214:30001/ +VITE_LOGIN_URL=https://u-pre.boe.com/web + + +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..ef2ad7d6 --- /dev/null +++ b/.env.boe @@ -0,0 +1,9 @@ +VITE_BASE=/manage +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..05c6e5c4 --- /dev/null +++ b/.env.release @@ -0,0 +1,10 @@ +VITE_BASE=/fe-student-release +VITE_BASE_API=/manageApi-release +VITE_LOGIN_URL=https://u.boe.com/web + + +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/package.json b/package.json index 935c5f5b..026679be 100644 --- a/package.json +++ b/package.json @@ -3,7 +3,7 @@ "version": "0.1.0", "private": true, "scripts": { - "serve": "vue-cli-service serve", + "serve": "vue-cli-service serve --mode boe", "build": "vue-cli-service build", "lint": "vue-cli-service lint" }, diff --git a/src/api/config.js b/src/api/config.js index 3353037a..87b1987b 100644 --- a/src/api/config.js +++ b/src/api/config.js @@ -2,12 +2,13 @@ * @Author: lixg lixg@dongwu-inc.com * @Date: 2022-11-21 14:32:52 * @LastEditors: lixg lixg@dongwu-inc.com - * @LastEditTime: 2022-12-14 18:56:46 + * @LastEditTime: 2022-12-14 20:56:10 * @FilePath: /fe-manage/src/api/config.js * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE */ import { message } from "ant-design-vue"; import axios from "axios"; +import router from "@/router"; // import { getCookie } from '../api/method' // const Qs = require("qs"); @@ -16,7 +17,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" }, @@ -56,8 +57,7 @@ http.interceptors.response.use( return response; } else { if (code === 1000) { - // window.open("https://u-pre.boe.com/web/", '_self'); - // window.open("http://111.231.196.214:12013/manage/login", '_self'); + process.env.NODE_ENV === 'development' ? router.push({ path: 'login' }) : (window.location.href = process.env.VITE_LOGIN_URL) } console.log("api %o", msg); } 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 @@