提交 3b9bcfd1 authored 作者: lihuihui's avatar lihuihui

修改提交考试后缓存接口拿不到id接口请求错误

上级 c5e37360
......@@ -333,17 +333,19 @@ export default {
})
},
getCache() {
action.Exam.getCache(this.$route.params.examId)
.then(res => {
const data = JSON.parse(res.answer)
if (data !== null && data !== 'null') {
this.questionParams.answerRecord = typeof data === 'string' ? JSON.parse(data) : data
this.getSignStu()
}
})
.catch(err => {
console.log(err)
})
if (this.$route.params.examId) {
action.Exam.getCache(this.$route.params.examId)
.then(res => {
const data = JSON.parse(res.answer)
if (data !== null && data !== 'null') {
this.questionParams.answerRecord = typeof data === 'string' ? JSON.parse(data) : data
this.getSignStu()
}
})
.catch(err => {
console.log(err)
})
}
},
getSignStu() {
this.questionParams.question.question_items.map((item, index) => {
......@@ -433,10 +435,10 @@ export default {
.left {
flex: 1;
padding: 10px 20px 0 53px;
&.hidden{
&.hidden {
overflow: hidden;
}
&.scroll{
&.scroll {
overflow-y: scroll;
scrollbar-width: none;
&::-webkit-scrollbar {
......@@ -449,10 +451,10 @@ export default {
width: 220px;
background: #fff;
padding: 0 20px;
&.hidden{
&.hidden {
overflow: hidden;
}
&.scroll{
&.scroll {
overflow-y: scroll;
scrollbar-width: none;
&::-webkit-scrollbar {
......
<template>
<div class="confirm-mian">
<div class="con-info" v-if="!isTreaty">
<div class="head">{{ examInfo.name }}</div>
<div class="head">{{ examInfo.name || '' }}</div>
<div class="box">
<div class="info-form">
<div class="tit">基本信息确认</div>
......@@ -45,7 +45,7 @@
</div>
</div>
<div class="explain-box" v-if="isTreaty">
<div class="head">{{ examInfo.name }}</div>
<div class="head">{{ examInfo.name || '' }}</div>
<div class="exp-text">
<div class="t">
<!-- <div class="fl">为保证本考试的公平性和严肃性,本次考试将会:</div> -->
......@@ -74,7 +74,7 @@ export default {
data() {
return {
sInfo: JSON.parse(window.localStorage.getItem('studentInfo')),
examInfo: JSON.parse(window.localStorage.getItem('examInfo')),
examInfo: JSON.parse(window.localStorage.getItem('examInfo')) || {},
form: {
educational_background: ''
},
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论