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

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

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