提交 3e0d30c4 authored 作者: 王鹏飞's avatar 王鹏飞

bug fixes

上级 a5fe817b
......@@ -18,7 +18,7 @@ provide('detail', $$(detail))
// 评分规则文件
const file = $computed(() => {
return detail ? JSON.parse(detail?.competition_rubric.url) : { url: '' }
return detail?.competition_rubric ? JSON.parse(detail.competition_rubric?.url) : { url: '' }
})
const platformUrl = ref('')
......@@ -33,6 +33,10 @@ watchEffect(() => {
platformUrl.value = first.url
})
const currentPlatformUrl = computed(() => {
return platformUrl.value + (platformUrl.value?.includes('?') ? '&' : '?') + `student_id=${detail?.student_id}`
})
async function fetchInfo() {
const res = await getCheckView({ id: props.id })
detail = res.data
......@@ -106,7 +110,7 @@ function handleResize() {
</el-row>
</AppCard>
<div class="lab-box">
<iframe :src="platformUrl" frameborder="0" class="iframe" ref="iframeRef"></iframe>
<iframe :src="currentPlatformUrl" frameborder="0" class="iframe" ref="iframeRef"></iframe>
</div>
</template>
</DragPanel>
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论