科普答题

master
lion 3 months ago
parent 80c7f3e748
commit 99ae0ecb1f

@ -49,6 +49,7 @@ const install = (Vue, vm) => {
icon: "none",
title: res?.data?.errmsg
})
return res.data
}
return false;
} else {

@ -48,7 +48,7 @@
</view>
<view class='answercheck'
v-for="(ans,ansindex) in question_list[questionIndex]?question_list[questionIndex].options:[]"
:key="ansindex">
:key="`${questionIndex}-${ans.id || ansindex}`">
<view
@click="chooseAnswer(ans,ansindex)"
:class="['answeritem-wrapper', {'active':ans.flag}, {'correct':ans.isanswer}, {'wrong':ans.iswrong}]">
@ -374,6 +374,11 @@
})
}
//
that.$nextTick(() => {
that.$forceUpdate()
})
//
that.resetTimer()
if (that.questionIndex >= 4) {
@ -453,6 +458,11 @@
})
}
//
that.$nextTick(() => {
that.$forceUpdate()
})
//
that.resetTimer()
@ -680,15 +690,20 @@
.answercheck {
padding: 30rpx;
padding-top: 0rpx;
&:last-child .answeritem-wrapper {
margin-bottom: 0;
}
}
.answeritem-wrapper {
// margin-bottom: 20rpx;
margin-bottom: 20rpx;
border-radius: 100rpx;
padding: 4rpx 20rpx;
background-color: #fff;
border: 4rpx solid transparent;
transition: all 0.3s;
transition: border-color 0.3s, background-color 0.3s;
box-sizing: border-box;
}
.answeritem-wrapper.active {

Loading…
Cancel
Save