From 160670c54034144d2606062ccaedb37e8cbb7849 Mon Sep 17 00:00:00 2001 From: wyx Date: Fri, 3 Feb 2023 17:19:14 +0800 Subject: [PATCH] =?UTF-8?q?feat:=E5=A2=9E=E5=8A=A0=E5=8A=A8=E6=80=81?= =?UTF-8?q?=E8=8E=B7=E5=8F=96=E5=8D=8F=E8=AE=AE=EF=BC=88http/https?= =?UTF-8?q?=EF=BC=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .env | 14 +++++++------- .env.boe | 10 +++++----- .env.prod | 16 ++++++++-------- .env.release | 14 +++++++------- src/api/ThirdApi.js | 2 +- src/api/request.js | 2 +- src/components/PathDetailImage.vue | 2 +- src/views/faceteach/FaceTeach.vue | 2 +- src/views/project/ProjectDetails.vue | 10 +++++----- src/views/project/ProjectManage.vue | 2 +- src/views/roadmap/PathDetails.vue | 12 ++++++------ 11 files changed, 43 insertions(+), 43 deletions(-) diff --git a/.env b/.env index 584a45f..f8b7e08 100644 --- a/.env +++ b/.env @@ -2,16 +2,16 @@ VITE_BASE=/fe-student VITE_BASE_API= VITE_OUTPUT_DIR=./dist VITE_FILE_PATH=/upload/ -VITE_BASE_LOGIN_URL=https://u-pre.boe.com/web/ +VITE_BASE_LOGIN_URL=//u-pre.boe.com/web/ VITE_PROXY_URL=http://43.143.139.204/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_TEST_OUT_DETAIL_URL=https://u-pre.boe.com/api/b1/tale/do-quiz?quizKid= -VITE_BOE_EXAM_DETAIL_URL=https://u-pre.boe.com/pc/exam/test?id= -VITE_BOE_PATH_DETAIL_URL=https://u-pre.boe.com/pc/forward?to=/fe-student +VITE_BOE_ONLINE_CLASS_URL=//u-pre.boe.com/pc/course/studyindex?id= +VITE_BOE_CASS_DETAIL_URL=//u-pre.boe.com/pc/case/detail?id= +VITE_BOE_TEST_DETAIL_URL=//u-pre.boe.com/web/quizsummary?detailId= +VITE_BOE_TEST_OUT_DETAIL_URL=//u-pre.boe.com/api/b1/tale/do-quiz?quizKid= +VITE_BOE_EXAM_DETAIL_URL=//u-pre.boe.com/pc/exam/test?id= +VITE_BOE_PATH_DETAIL_URL=//u-pre.boe.com/pc/forward?to=/fe-student VITE_BOE_API_URL=https://u-pre.boe.com diff --git a/.env.boe b/.env.boe index e483b78..a5a4851 100644 --- a/.env.boe +++ b/.env.boe @@ -1,10 +1,10 @@ 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_TEST_OUT_DETAIL_URL=https://u-pre.boe.com/api/b1/tale/do-quiz?quizKid= -VITE_BOE_EXAM_DETAIL_URL=https://u-pre.boe.com/pc/exam/test?id= +VITE_BOE_ONLINE_CLASS_URL=//u-pre.boe.com/pc/course/studyindex?id= +VITE_BOE_CASS_DETAIL_URL=//u-pre.boe.com/pc/case/detail?id= +VITE_BOE_TEST_DETAIL_URL=//u-pre.boe.com/web/quizsummary?detailId= +VITE_BOE_TEST_OUT_DETAIL_URL=//u-pre.boe.com/api/b1/tale/do-quiz?quizKid= +VITE_BOE_EXAM_DETAIL_URL=//u-pre.boe.com/pc/exam/test?id= VITE_BOE_API_URL=https://u-pre.boe.com \ No newline at end of file diff --git a/.env.prod b/.env.prod index 9d81f3f..ba8382c 100644 --- a/.env.prod +++ b/.env.prod @@ -1,15 +1,15 @@ VITE_BASE=/fe-student VITE_BASE_API=/manageApi -VITE_BASE_LOGIN_URL=https://u.boe.com/web/ +VITE_BASE_LOGIN_URL=//u.boe.com/web/ -VITE_BOE_ONLINE_CLASS_URL=https://u.boe.com/pc/course/studyindex?id= -VITE_BOE_CASS_DETAIL_URL=https://u.boe.com/pc/case/detail?id= -VITE_BOE_TEST_DETAIL_URL=https://u.boe.com/web/quizsummary?detailId= -VITE_BOE_TEST_OUT_DETAIL_URL=https://u.boe.com/api/b1/tale/do-quiz?quizKid= -VITE_BOE_EXAM_DETAIL_URL=https://u.boe.com/pc/exam/test?id= -VITE_BOE_PATH_DETAIL_URL=https://u.boe.com/pc/forward?to=/fe-student +VITE_BOE_ONLINE_CLASS_URL=//u.boe.com/pc/course/studyindex?id= +VITE_BOE_CASS_DETAIL_URL=//u.boe.com/pc/case/detail?id= +VITE_BOE_TEST_DETAIL_URL=//u.boe.com/web/quizsummary?detailId= +VITE_BOE_TEST_OUT_DETAIL_URL=//u.boe.com/api/b1/tale/do-quiz?quizKid= +VITE_BOE_EXAM_DETAIL_URL=//u.boe.com/pc/exam/test?id= +VITE_BOE_PATH_DETAIL_URL=//u.boe.com/pc/forward?to=/fe-student VITE_BOE_API_URL=https://u.boe.com -VITE_TASK_WHITE_TYPE=-8-,-12-,-13- +VITE_TASK_WHITE_TYPE==-22- diff --git a/.env.release b/.env.release index 6ab43ac..072c5f2 100644 --- a/.env.release +++ b/.env.release @@ -1,12 +1,12 @@ VITE_BASE=/fe-student-release VITE_BASE_API=/manageApi-release -VITE_BASE_LOGIN_URL=https://u.boe.com/web/ +VITE_BASE_LOGIN_URL=//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_TEST_OUT_DETAIL_URL=https://u.boe.com/api/b1/tale/do-quiz?quizKid= -VITE_BOE_EXAM_DETAIL_URL=https://u.boe.com/pc-release/exam/test?id= -VITE_BOE_PATH_DETAIL_URL=https://u.boe.com/pc-release/forward?to=/fe-student-release +VITE_BOE_ONLINE_CLASS_URL=//u.boe.com/pc-release/course/studyindex?id= +VITE_BOE_CASS_DETAIL_URL=//u.boe.com/pc-release/case/detail?id= +VITE_BOE_TEST_DETAIL_URL=//u.boe.com/web/quizsummary?detailId= +VITE_BOE_TEST_OUT_DETAIL_URL=//u.boe.com/api/b1/tale/do-quiz?quizKid= +VITE_BOE_EXAM_DETAIL_URL=//u.boe.com/pc-release/exam/test?id= +VITE_BOE_PATH_DETAIL_URL=//u.boe.com/pc-release/forward?to=/fe-student-release VITE_BOE_API_URL=https://u.boe.com \ No newline at end of file diff --git a/src/api/ThirdApi.js b/src/api/ThirdApi.js index 47c1611..8dc6f18 100644 --- a/src/api/ThirdApi.js +++ b/src/api/ThirdApi.js @@ -1,4 +1,4 @@ -export const BASE = 'https://u-pre.boe.com' +export const BASE = window.location.protocol + '//u-pre.boe.com' export const GET_USER_LIST = `/userbasic/user/list post` export const GET_USER_INFO = `/userbasic/user/info post` diff --git a/src/api/request.js b/src/api/request.js index d4a3df5..c9e3ab3 100644 --- a/src/api/request.js +++ b/src/api/request.js @@ -98,7 +98,7 @@ export async function request(_url, params) { }).then(resp => resp.data).then(response => { if (response.code !== 200 && response.code !== 0) { if (response.code === 1000) { - (import.meta.env.MODE === 'development' || import.meta.env.MODE === 'test') ? router.push({path: '/login'}) : window.open(import.meta.env.VITE_BASE_LOGIN_URL, '_top') + (import.meta.env.MODE === 'development' || import.meta.env.MODE === 'test') ? router.push({path: '/login'}) : window.open(window.location.protocol + import.meta.env.VITE_BASE_LOGIN_URL, '_top') } if (response.code === 2001) { router.push({path: '/FaceTeachSignUp', query: {courseId: router.currentRoute.value.query.courseId,type:3}}) diff --git a/src/components/PathDetailImage.vue b/src/components/PathDetailImage.vue index 1d5a391..b71835f 100644 --- a/src/components/PathDetailImage.vue +++ b/src/components/PathDetailImage.vue @@ -61,7 +61,7 @@ function toDetail(i) { query: {routerId: props.detail.routerId, routerName: props.detail.routerName}, }) : window.open( - `${import.meta.env.VITE_BOE_PATH_DETAIL_URL}/pathdetails¶ms=${encodeURIComponent( + `${window.location.protocol + import.meta.env.VITE_BOE_PATH_DETAIL_URL}/pathdetails¶ms=${encodeURIComponent( `routerId=${props.detail.routerId}&routerName=${props.detail.routerName}` )}` ,'_top'); diff --git a/src/views/faceteach/FaceTeach.vue b/src/views/faceteach/FaceTeach.vue index e2c8c5c..34593ff 100644 --- a/src/views/faceteach/FaceTeach.vue +++ b/src/views/faceteach/FaceTeach.vue @@ -512,7 +512,7 @@ function toExamItem(obj) { } console.log("obj", obj.examinationTestId); window.open( - import.meta.env.VITE_BOE_EXAM_DETAIL_URL + obj.examinationTestId, + window.location.protocol + import.meta.env.VITE_BOE_EXAM_DETAIL_URL + obj.examinationTestId, "_top" ); //测评 // router.push({ path: import.meta.env.VITE_BOE_EXAM_DETAIL_URL+ obj.examinationTestId }); diff --git a/src/views/project/ProjectDetails.vue b/src/views/project/ProjectDetails.vue index 412c360..89cb5ae 100644 --- a/src/views/project/ProjectDetails.vue +++ b/src/views/project/ProjectDetails.vue @@ -361,11 +361,11 @@ const types = ref({ 13: "去完成", }, path: { - 1: import.meta.env.VITE_BOE_ONLINE_CLASS_URL, //在线 + 1: window.location.protocol + import.meta.env.VITE_BOE_ONLINE_CLASS_URL, //在线 2: ({ courseId }) => window.open(`${location.protocol}//${location.host}${import.meta.env.VITE_BASE_API}/stu/project/redirectDetail?courseId=${courseId}`, '_top'), - 3: import.meta.env.VITE_BOE_CASS_DETAIL_URL, //案例 + 3: window.location.protocol + import.meta.env.VITE_BOE_CASS_DETAIL_URL, //案例 4: "/homeworkpage", - 5: import.meta.env.VITE_BOE_EXAM_DETAIL_URL, //考试 + 5: window.location.protocol + import.meta.env.VITE_BOE_EXAM_DETAIL_URL, //考试 6: "/livebroadcast", 7: ({ targetId }) => window.open(targetId, '_top'), 8: "/discusspage", @@ -373,8 +373,8 @@ const types = ref({ 10: ({ evaType, targetId }) => window.open( evaType == 0 - ? import.meta.env.VITE_BOE_TEST_DETAIL_URL+ targetId - : import.meta.env.VITE_BOE_TEST_OUT_DETAIL_URL+targetId+`&quizTaskKid=${projectId}&channelCode=project` + ? window.location.protocol + import.meta.env.VITE_BOE_TEST_DETAIL_URL+ targetId + : window.location.protocol + import.meta.env.VITE_BOE_TEST_OUT_DETAIL_URL+targetId+`&quizTaskKid=${projectId}&channelCode=project` ,'_top'), //测评 11: "/surveydetail", 12: "/ballotpage", diff --git a/src/views/project/ProjectManage.vue b/src/views/project/ProjectManage.vue index dd55edf..f27d49d 100644 --- a/src/views/project/ProjectManage.vue +++ b/src/views/project/ProjectManage.vue @@ -261,7 +261,7 @@ const goProjectDetails = (value) => { }) : window.open( - `${import.meta.env.VITE_BOE_PATH_DETAIL_URL}/projectdetails¶ms=${encodeURIComponent( + `${window.location.protocol + import.meta.env.VITE_BOE_PATH_DETAIL_URL}/projectdetails¶ms=${encodeURIComponent( `projectId=${value.projectId}` ,'_top')}` ); diff --git a/src/views/roadmap/PathDetails.vue b/src/views/roadmap/PathDetails.vue index 1364cee..00b5176 100644 --- a/src/views/roadmap/PathDetails.vue +++ b/src/views/roadmap/PathDetails.vue @@ -338,11 +338,11 @@ const types = ref({ 13: "去完成", }, path: { - 1: import.meta.env.VITE_BOE_ONLINE_CLASS_URL, //在线 - 2: ({ courseId }) => window.open(`${location.protocol}//${location.host}${import.meta.env.VITE_BASE_API}/stu/project/redirectDetail?courseId=${courseId}`, '_top'), - 3: import.meta.env.VITE_BOE_CASS_DETAIL_URL, //案例 + 1: window.location.protocol + import.meta.env.VITE_BOE_ONLINE_CLASS_URL, //在线 + 2: ({ courseId }) => window.open(`${location.protocol}//${location.host}${import.meta.env.VITE_BASE_API}/stu/project/redirectDetail?courseId=${courseId}`, '_top'), + 3: window.location.protocol + import.meta.env.VITE_BOE_CASS_DETAIL_URL, //案例 4: "/homeworkpage", - 5: import.meta.env.VITE_BOE_EXAM_DETAIL_URL, //考试 + 5: window.location.protocol + import.meta.env.VITE_BOE_EXAM_DETAIL_URL, //考试 6: "/livebroadcast", 7: ({ targetId }) => window.open(targetId, '_top'), //外联 8: "/discusspage", @@ -350,8 +350,8 @@ const types = ref({ 10: ({ evaType, targetId }) => window.open( evaType == 0 - ? import.meta.env.VITE_BOE_TEST_DETAIL_URL+targetId - : import.meta.env.VITE_BOE_TEST_OUT_DETAIL_URL + targetId+`&quizTaskKid=${routerId}&channelCode=learningpath` + ? window.location.protocol + import.meta.env.VITE_BOE_TEST_DETAIL_URL+targetId + : window.location.protocol + import.meta.env.VITE_BOE_TEST_OUT_DETAIL_URL + targetId+`&quizTaskKid=${routerId}&channelCode=learningpath` ,'_top'), //测评 11: "/surveydetail", 12: "/ballotpage",