Files
fe-student/src/api/CONST.js
2024-05-16 13:31:49 +08:00

58 lines
2.0 KiB
JavaScript

export const PROJECT = 1;
export const ROUTER = 2;
export const COURSE = 3;
export const TASK_TYPES = {
typeName: {
1: "在线",
2: "面授",
3: "案例",
4: "作业",
5: "考试",
6: "直播",
7: "外链",
8: "讨论",
9: "活动",
10: "测评",
11: "评估",
12: "投票",
13: "项目",
},
toName: {
1: "去上课",
2: "去上课",
3: "去阅读",
4: "去完成",
5: "去完成",
6: "去观看",
7: "去查看",
8: "去讨论",
9: "去签到",
10: "去完成",
11: "去完成",
12: "去投票",
13: "去完成",
20: "未开始",
21: "进行中"
},
path: {
1: ({courseId}) => window.open(window.location.protocol + import.meta.env.VITE_BOE_ONLINE_CLASS_URL + courseId), //在线
2: ({targetId}) => window.open(`${location.protocol}//${location.host}${import.meta.env.VITE_BASE_API}/stu/project/redirectDetail?courseId=${targetId}`, '_top'),
3: ({courseId}) => window.open(window.location.protocol + import.meta.env.VITE_BOE_CASS_DETAIL_URL + courseId), //案例
4: "/homeworkpage",
5: ({examType}) => examType === 2 ? '/externalexamination' : (window.location.protocol + import.meta.env.VITE_BOE_EXAM_DETAIL_URL), //考试
6: "/livebroadcast",
7: '/outerchain', //外联
8: "/discusspage",
9: "/moreactive",
10: ({evaType, targetId}) =>
window.open(
evaType == 0
? 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",
13: "/projectdetails",
},
}