mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/fe-student.git
synced 2025-12-11 11:56:48 +08:00
fix:修改在线案例考试测评跳转
This commit is contained in:
@@ -306,7 +306,7 @@ import medal1 from "@/assets/image/medal/medal1.png";
|
||||
import medal2 from "@/assets/image/medal/medal2.png";
|
||||
import medal3 from "@/assets/image/medal/medal3.png";
|
||||
import img from "@/assets/image/uploadimg.png";
|
||||
import { useRequest } from "@/api/request";
|
||||
import { useRequest, request } from "@/api/request";
|
||||
import { PROJECT_PROCESS, ROUTER_PROCESS } from "@/api/api";
|
||||
import { useRoute, useRouter } from "vue-router";
|
||||
|
||||
@@ -535,16 +535,16 @@ const types = ref({
|
||||
13: "去完成",
|
||||
},
|
||||
path: {
|
||||
1: "去上课",
|
||||
1: import.meta.env.VITE_BOE_ONLINE_CLASS_URL, //在线
|
||||
2: "/faceteach",
|
||||
3: "案例",
|
||||
3: import.meta.env.VITE_BOE_CASS_DETAIL_URL, //案例
|
||||
4: "/homeworkpage",
|
||||
5: "去完成",
|
||||
5: import.meta.env.VITE_BOE_EXAM_DETAIL_URL, //考试
|
||||
6: "/livebroadcast",
|
||||
7: "外链",
|
||||
7: " ",
|
||||
8: "/discusspage",
|
||||
9: "/moreactive",
|
||||
10: "/starttest",
|
||||
10: import.meta.env.VITE_BOE_TEST_DETAIL_URL, //测评
|
||||
11: "/surveydetail",
|
||||
12: "/ballotpage",
|
||||
13: "去完成",
|
||||
@@ -552,6 +552,32 @@ const types = ref({
|
||||
});
|
||||
|
||||
function toFinish(d) {
|
||||
if (!types.value.path[d.type]) {
|
||||
ElMessage.error("暂时未开放");
|
||||
return;
|
||||
}
|
||||
if (types.value.path[d.type] && types.value.path[d.type].startsWith("http")) {
|
||||
//配置文件
|
||||
const url = types.value.path[d.type] + d.targetId;
|
||||
console.log("url", d, url);
|
||||
import.meta.env.DEV
|
||||
? (window.location.href = url)
|
||||
: (window.parent.location.href = url);
|
||||
return;
|
||||
}
|
||||
if (d.type === 7) {
|
||||
// console.log("url", d, url);
|
||||
request(LINK_DETAILS(d.courseId), {}).then((res) => {
|
||||
console.log("resssss", res);
|
||||
if (res.code === 200) {
|
||||
const url = res.data.linkAddress;
|
||||
import.meta.env.DEV
|
||||
? (window.location.href = url)
|
||||
: (window.parent.location.href = url);
|
||||
}
|
||||
});
|
||||
return;
|
||||
}
|
||||
router.push({
|
||||
path: types.value.path[d.type],
|
||||
query: { id: d.projectTaskId, type: 2, courseId: d.courseId },
|
||||
|
||||
Reference in New Issue
Block a user