diff --git a/src/views/testscore/OuterChain.vue b/src/views/testscore/OuterChain.vue index fcf5dad..2e07bc1 100644 --- a/src/views/testscore/OuterChain.vue +++ b/src/views/testscore/OuterChain.vue @@ -42,11 +42,11 @@
- +
- {{ state.datainfo.linkAddress ? state.datainfo.linkAddress : "-" }} + {{ datainfo.linkAddress ? datainfo.linkAddress : "-" }}
@@ -64,7 +64,7 @@
- {{ state.datainfo.linkDescription ? state.datainfo.linkDescription : "暂无链接说明" }} + {{ datainfo.linkDescription ? datainfo.linkDescription : "暂无链接说明" }}
@@ -80,7 +80,7 @@ import { LINKGETONE } from "@/api/api"; - import {reactive} from "vue"; + import {ref} from "vue"; import {useRoute,useRouter} from "vue-router/dist/vue-router"; import {useTaskPage} from "@/api/useCommon"; @@ -93,15 +93,13 @@ router.back(); }; - const state = reactive({ - datainfo: {} - }) + const datainfo = ref({}); //获取基本信息 request(LINKGETONE, {linkId:courseId}).then(res=>{ console.log("我是获取的外链基本信息1",res) - state.datainfo = res.data - console.log("我是获取的外链基本信息2",state.datainfo) + datainfo.value = res.data; + console.log("我是获取的外链基本信息2",datainfo.value) }).catch(err=>{ console.log(err) }); @@ -110,20 +108,19 @@ // 查看外链 const handleClick = async(url) => { - console.log('我是获取的外链基本信息5', state.dataInfo) - console.log('我是获取的外链基本信息6', state) - // await request(UPDATE_CURRENT_TASK, { id: d.id, type: PROJECT, pid: projectId, name: d.name }) - // if ( d.type == 7 ) { - // d.status !== 1 && await request(STUDY_RECORD, { - // studentId: userInfo.value.id, - // targetId: data.value.routerId, - // logo: PROJECT, - // type: PROJECT, - // stageOrChapterId: chapterOrStageId, - // taskId: d.id, - // taskType: d.type, - // }); - // } + console.log('我是获取的外链基本信息', datainfo.value) + // await request(UPDATE_CURRENT_TASK, { id: d.id, type: PROJECT, pid: projectId, name: d.name }) + // if ( d.type == 7 ) { + // d.status !== 1 && await request(STUDY_RECORD, { + // studentId: userInfo.value.id, + // targetId: data.value.routerId, + // logo: PROJECT, + // type: PROJECT, + // stageOrChapterId: chapterOrStageId, + // taskId: d.id, + // taskType: d.type, + // }); + // } window.open(url); }