提交 929efe75 authored 作者: lihuihui's avatar lihuihui

修改考一考标题,选项添加序号,添加列表空样式

上级 d6d93a5e
......@@ -41,7 +41,7 @@
import * as api from '@/api/courseExam.js'
export default {
metaInfo: {
title: '考一考'
title: '考前摸底'
},
data() {
return {
......
......@@ -31,6 +31,7 @@
</li>
</template>
</ul>
<van-empty description="暂无内容" v-if="dataList.length == 0"/>
</div>
</div>
</div>
......@@ -90,10 +91,14 @@ export default {
duration: 5000,
loadingType: 'spinner'
})
api.getAllQuestion({ type: this.$route.query.type, question_type: this.$route.query.questionType }).then(res => {
this.dataList = res
Toast.clear()
})
api.getAllQuestion({ type: this.$route.query.type, question_type: this.$route.query.questionType })
.then(res => {
this.dataList = res
Toast.clear()
})
.catch(() => {
this.dataList = []
})
}
}
}
......
......@@ -24,7 +24,7 @@
<div class="topic-bt" v-if="item.question_type == '5'" v-html="item.common_content"></div>
<div class="topic" v-html="item.question_content"></div>
<ul class="option">
<template v-for="opt in item.question_options">
<template v-for="(opt, optIndex) in item.question_options">
<li
v-if="$route.query.type != 3"
:key="opt.id"
......@@ -36,7 +36,7 @@
: ''"
>
<van-icon class="icon" name="checked" v-if="item.user_answer.length != 0 && item.question_answer.find(id => { return id === opt.id })"/>
<div>{{ opt.option }}</div>
<div>{{ A_Z[optIndex] }}. {{ opt.option }}</div>
</li>
<li
v-else
......@@ -49,7 +49,7 @@
: ''"
>
<van-icon class="icon" name="checked" v-if="item.user_answer.length != 0 && item.question_answer.find(id => { return id === opt.id })"/>
<div>{{ opt.option }}</div>
<div>{{ A_Z[optIndex] }}. {{ opt.option }}</div>
</li>
</template>
</ul>
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论