mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/fe-student.git
synced 2025-12-06 09:26:46 +08:00
feat:增加动态获取协议(http/https)
This commit is contained in:
14
.env
14
.env
@@ -2,16 +2,16 @@ VITE_BASE=/fe-student
|
|||||||
VITE_BASE_API=
|
VITE_BASE_API=
|
||||||
VITE_OUTPUT_DIR=./dist
|
VITE_OUTPUT_DIR=./dist
|
||||||
VITE_FILE_PATH=/upload/
|
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_PROXY_URL=http://43.143.139.204/manageApi
|
||||||
|
|
||||||
|
|
||||||
VITE_BOE_ONLINE_CLASS_URL=https://u-pre.boe.com/pc/course/studyindex?id=
|
VITE_BOE_ONLINE_CLASS_URL=//u-pre.boe.com/pc/course/studyindex?id=
|
||||||
VITE_BOE_CASS_DETAIL_URL=https://u-pre.boe.com/pc/case/detail?id=
|
VITE_BOE_CASS_DETAIL_URL=//u-pre.boe.com/pc/case/detail?id=
|
||||||
VITE_BOE_TEST_DETAIL_URL=https://u-pre.boe.com/web/quizsummary?detailId=
|
VITE_BOE_TEST_DETAIL_URL=//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_TEST_OUT_DETAIL_URL=//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_EXAM_DETAIL_URL=//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_PATH_DETAIL_URL=//u-pre.boe.com/pc/forward?to=/fe-student
|
||||||
|
|
||||||
VITE_BOE_API_URL=https://u-pre.boe.com
|
VITE_BOE_API_URL=https://u-pre.boe.com
|
||||||
|
|
||||||
|
|||||||
10
.env.boe
10
.env.boe
@@ -1,10 +1,10 @@
|
|||||||
VITE_BASE=/fe-student
|
VITE_BASE=/fe-student
|
||||||
VITE_BASE_API=/manageApi
|
VITE_BASE_API=/manageApi
|
||||||
|
|
||||||
VITE_BOE_ONLINE_CLASS_URL=https://u-pre.boe.com/pc/course/studyindex?id=
|
VITE_BOE_ONLINE_CLASS_URL=//u-pre.boe.com/pc/course/studyindex?id=
|
||||||
VITE_BOE_CASS_DETAIL_URL=https://u-pre.boe.com/pc/case/detail?id=
|
VITE_BOE_CASS_DETAIL_URL=//u-pre.boe.com/pc/case/detail?id=
|
||||||
VITE_BOE_TEST_DETAIL_URL=https://u-pre.boe.com/web/quizsummary?detailId=
|
VITE_BOE_TEST_DETAIL_URL=//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_TEST_OUT_DETAIL_URL=//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_EXAM_DETAIL_URL=//u-pre.boe.com/pc/exam/test?id=
|
||||||
|
|
||||||
VITE_BOE_API_URL=https://u-pre.boe.com
|
VITE_BOE_API_URL=https://u-pre.boe.com
|
||||||
16
.env.prod
16
.env.prod
@@ -1,15 +1,15 @@
|
|||||||
VITE_BASE=/fe-student
|
VITE_BASE=/fe-student
|
||||||
VITE_BASE_API=/manageApi
|
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_ONLINE_CLASS_URL=//u.boe.com/pc/course/studyindex?id=
|
||||||
VITE_BOE_CASS_DETAIL_URL=https://u.boe.com/pc/case/detail?id=
|
VITE_BOE_CASS_DETAIL_URL=//u.boe.com/pc/case/detail?id=
|
||||||
VITE_BOE_TEST_DETAIL_URL=https://u.boe.com/web/quizsummary?detailId=
|
VITE_BOE_TEST_DETAIL_URL=//u.boe.com/web/quizsummary?detailId=
|
||||||
VITE_BOE_TEST_OUT_DETAIL_URL=https://u.boe.com/api/b1/tale/do-quiz?quizKid=
|
VITE_BOE_TEST_OUT_DETAIL_URL=//u.boe.com/api/b1/tale/do-quiz?quizKid=
|
||||||
VITE_BOE_EXAM_DETAIL_URL=https://u.boe.com/pc/exam/test?id=
|
VITE_BOE_EXAM_DETAIL_URL=//u.boe.com/pc/exam/test?id=
|
||||||
VITE_BOE_PATH_DETAIL_URL=https://u.boe.com/pc/forward?to=/fe-student
|
VITE_BOE_PATH_DETAIL_URL=//u.boe.com/pc/forward?to=/fe-student
|
||||||
|
|
||||||
VITE_BOE_API_URL=https://u.boe.com
|
VITE_BOE_API_URL=https://u.boe.com
|
||||||
|
|
||||||
VITE_TASK_WHITE_TYPE=-8-,-12-,-13-
|
VITE_TASK_WHITE_TYPE==-22-
|
||||||
|
|||||||
14
.env.release
14
.env.release
@@ -1,12 +1,12 @@
|
|||||||
VITE_BASE=/fe-student-release
|
VITE_BASE=/fe-student-release
|
||||||
VITE_BASE_API=/manageApi-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_ONLINE_CLASS_URL=//u.boe.com/pc-release/course/studyindex?id=
|
||||||
VITE_BOE_CASS_DETAIL_URL=https://u.boe.com/pc-release/case/detail?id=
|
VITE_BOE_CASS_DETAIL_URL=//u.boe.com/pc-release/case/detail?id=
|
||||||
VITE_BOE_TEST_DETAIL_URL=https://u.boe.com/web/quizsummary?detailId=
|
VITE_BOE_TEST_DETAIL_URL=//u.boe.com/web/quizsummary?detailId=
|
||||||
VITE_BOE_TEST_OUT_DETAIL_URL=https://u.boe.com/api/b1/tale/do-quiz?quizKid=
|
VITE_BOE_TEST_OUT_DETAIL_URL=//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_EXAM_DETAIL_URL=//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_PATH_DETAIL_URL=//u.boe.com/pc-release/forward?to=/fe-student-release
|
||||||
|
|
||||||
VITE_BOE_API_URL=https://u.boe.com
|
VITE_BOE_API_URL=https://u.boe.com
|
||||||
@@ -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_LIST = `/userbasic/user/list post`
|
||||||
export const GET_USER_INFO = `/userbasic/user/info post`
|
export const GET_USER_INFO = `/userbasic/user/info post`
|
||||||
|
|
||||||
|
|||||||
@@ -98,7 +98,7 @@ export async function request(_url, params) {
|
|||||||
}).then(resp => resp.data).then(response => {
|
}).then(resp => resp.data).then(response => {
|
||||||
if (response.code !== 200 && response.code !== 0) {
|
if (response.code !== 200 && response.code !== 0) {
|
||||||
if (response.code === 1000) {
|
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) {
|
if (response.code === 2001) {
|
||||||
router.push({path: '/FaceTeachSignUp', query: {courseId: router.currentRoute.value.query.courseId,type:3}})
|
router.push({path: '/FaceTeachSignUp', query: {courseId: router.currentRoute.value.query.courseId,type:3}})
|
||||||
|
|||||||
@@ -61,7 +61,7 @@ function toDetail(i) {
|
|||||||
query: {routerId: props.detail.routerId, routerName: props.detail.routerName},
|
query: {routerId: props.detail.routerId, routerName: props.detail.routerName},
|
||||||
})
|
})
|
||||||
: window.open(
|
: 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}`
|
`routerId=${props.detail.routerId}&routerName=${props.detail.routerName}`
|
||||||
)}`
|
)}`
|
||||||
,'_top');
|
,'_top');
|
||||||
|
|||||||
@@ -512,7 +512,7 @@ function toExamItem(obj) {
|
|||||||
}
|
}
|
||||||
console.log("obj", obj.examinationTestId);
|
console.log("obj", obj.examinationTestId);
|
||||||
window.open(
|
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"
|
"_top"
|
||||||
); //测评
|
); //测评
|
||||||
// router.push({ path: import.meta.env.VITE_BOE_EXAM_DETAIL_URL+ obj.examinationTestId });
|
// router.push({ path: import.meta.env.VITE_BOE_EXAM_DETAIL_URL+ obj.examinationTestId });
|
||||||
|
|||||||
@@ -361,11 +361,11 @@ const types = ref({
|
|||||||
13: "去完成",
|
13: "去完成",
|
||||||
},
|
},
|
||||||
path: {
|
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'),
|
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",
|
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",
|
6: "/livebroadcast",
|
||||||
7: ({ targetId }) => window.open(targetId, '_top'),
|
7: ({ targetId }) => window.open(targetId, '_top'),
|
||||||
8: "/discusspage",
|
8: "/discusspage",
|
||||||
@@ -373,8 +373,8 @@ const types = ref({
|
|||||||
10: ({ evaType, targetId }) =>
|
10: ({ evaType, targetId }) =>
|
||||||
window.open(
|
window.open(
|
||||||
evaType == 0
|
evaType == 0
|
||||||
? import.meta.env.VITE_BOE_TEST_DETAIL_URL+ targetId
|
? window.location.protocol + 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_OUT_DETAIL_URL+targetId+`&quizTaskKid=${projectId}&channelCode=project`
|
||||||
,'_top'), //测评
|
,'_top'), //测评
|
||||||
11: "/surveydetail",
|
11: "/surveydetail",
|
||||||
12: "/ballotpage",
|
12: "/ballotpage",
|
||||||
|
|||||||
@@ -261,7 +261,7 @@ const goProjectDetails = (value) => {
|
|||||||
})
|
})
|
||||||
:
|
:
|
||||||
window.open(
|
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}`
|
`projectId=${value.projectId}`
|
||||||
,'_top')}`
|
,'_top')}`
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -338,11 +338,11 @@ const types = ref({
|
|||||||
13: "去完成",
|
13: "去完成",
|
||||||
},
|
},
|
||||||
path: {
|
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'),
|
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",
|
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",
|
6: "/livebroadcast",
|
||||||
7: ({ targetId }) => window.open(targetId, '_top'), //外联
|
7: ({ targetId }) => window.open(targetId, '_top'), //外联
|
||||||
8: "/discusspage",
|
8: "/discusspage",
|
||||||
@@ -350,8 +350,8 @@ const types = ref({
|
|||||||
10: ({ evaType, targetId }) =>
|
10: ({ evaType, targetId }) =>
|
||||||
window.open(
|
window.open(
|
||||||
evaType == 0
|
evaType == 0
|
||||||
? import.meta.env.VITE_BOE_TEST_DETAIL_URL+targetId
|
? window.location.protocol + 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_OUT_DETAIL_URL + targetId+`&quizTaskKid=${routerId}&channelCode=learningpath`
|
||||||
,'_top'), //测评
|
,'_top'), //测评
|
||||||
11: "/surveydetail",
|
11: "/surveydetail",
|
||||||
12: "/ballotpage",
|
12: "/ballotpage",
|
||||||
|
|||||||
Reference in New Issue
Block a user