mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/fe-student.git
synced 2025-12-19 15:56:50 +08:00
fix:修改在线案例考试测评跳转
This commit is contained in:
@@ -341,8 +341,8 @@ 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 { boeRequest, useRequest } from "@/api/request";
|
||||
import { ROUTER_PROCESS } from "@/api/api";
|
||||
import { boeRequest, useRequest, request } from "@/api/request";
|
||||
import { ROUTER_PROCESS, LINK_DETAILS } from "@/api/api";
|
||||
import { useRoute, useRouter } from "vue-router";
|
||||
import { ElMessage } from "element-plus";
|
||||
import { useUserInfo } from "@/api/utils";
|
||||
@@ -352,6 +352,8 @@ const {
|
||||
} = useRoute();
|
||||
const router = useRouter();
|
||||
const { data } = useRequest(ROUTER_PROCESS, { routerId });
|
||||
console.log("datadata", data);
|
||||
|
||||
const { avatar: userAvatar } = useUserInfo(
|
||||
computed(() => data.value?.userInfoBo?.userId)
|
||||
);
|
||||
@@ -576,16 +578,16 @@ const types = ref({
|
||||
13: "去完成",
|
||||
},
|
||||
path: {
|
||||
1: import.meta.env.VITE_BOE_ONLINE_CLASS_URL,
|
||||
1: import.meta.env.VITE_BOE_ONLINE_CLASS_URL, //在线
|
||||
2: "/faceteach",
|
||||
3: import.meta.env.VITE_BOE_CASS_DETAIL_URL,
|
||||
3: import.meta.env.VITE_BOE_CASS_DETAIL_URL, //案例
|
||||
4: "/homeworkpage",
|
||||
5: import.meta.env.VITE_BOE_TEST_DETAIL_URL,
|
||||
5: import.meta.env.VITE_BOE_EXAM_DETAIL_URL, //考试
|
||||
6: "/livebroadcast",
|
||||
7: "",
|
||||
7: " ",
|
||||
8: "/discusspage",
|
||||
9: "/moreactive",
|
||||
10: "/surveydetail",
|
||||
10: import.meta.env.VITE_BOE_TEST_DETAIL_URL, //测评
|
||||
11: "/surveydetail",
|
||||
12: "/ballotpage",
|
||||
13: "去完成",
|
||||
@@ -593,19 +595,33 @@ const types = ref({
|
||||
});
|
||||
|
||||
function toFinish(d) {
|
||||
console.log("ddd", 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.type === 1 ? d.targetId : d.courseId);
|
||||
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.routerTaskId, type: 1, courseId: d.courseId },
|
||||
|
||||
Reference in New Issue
Block a user