feat:增加测评去学习请求接口返回跳转url进行跳转

This commit is contained in:
wyx
2023-02-04 17:11:41 +08:00
parent 160670c540
commit da1879f977
3 changed files with 69 additions and 2 deletions

View File

@@ -277,7 +277,7 @@ import { computed, reactive, ref, watch } from "vue";
import circle from '../../assets/image/pathdetails/circle.png';
import circle2 from '../../assets/image/pathdetails/circle2.png';
import { boeRequest, useRequest, request } from "@/api/request";
import { ROUTER_PROCESS, LINK_DETAILS, STUDY_RECORD } from "@/api/api";
import { ROUTER_PROCESS, LINK_DETAILS, STUDY_RECORD, EvaluationToLearn } from "@/api/api";
import { useRoute, useRouter } from "vue-router";
import { ElMessage } from "element-plus";
import store from "@/store";
@@ -486,6 +486,39 @@ function toFinish(d) {
return
}
}
// 测评模块 请求接口跳转新的页面 - 新增 暂时未调试 目前无测评数据 2023-02-04
if(d.type == 100) {
// 调用接口 跳转页面
console.log('我是查询测评跳转链接所传递得参数',{
"businessType": "project",
"chapterId": chapterOrStageId,
"courseId": d.courseId,
"quizKid": "",
"routerOrProjectId": routerId,
"studentId": userInfo.value.id,
"studentName": userInfo.value.realName
})
request(EvaluationToLearn, {
"businessType": "project",
"chapterId": chapterOrStageId,
"courseId": d.courseId,
"quizKid": "",
"routerOrProjectId": routerId,
"studentId": userInfo.value.id,
"studentName": userInfo.value.realName
}).then(res=>{
console.log(res)
if(res.data.code==200){
// 此处写跳转url
window.open( 'http://ceping.com', '_top')
}
}).catch(err=>{
console.log(err)
})
return
}
if (typeof types.value.path[d.type] === "string") {
types.value.path[d.type] &&
types.value.path[d.type].startsWith("http") &&