科普答题

master
lion 3 months ago
parent 80c7f3e748
commit 99ae0ecb1f

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

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

Loading…
Cancel
Save