mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/learning-system-mobile.git
synced 2025-12-09 10:56:47 +08:00
提交修改
This commit is contained in:
@@ -13,13 +13,13 @@
|
||||
<view class="qitem-info">[{{getQuestionType(curItem.type)}}]{{curItem.title}}</view>
|
||||
<view v-if="curItem.type == 3">
|
||||
<view class="qitem-opts">
|
||||
<view class="qitem-opt" :class="{check:curItem.answer && curItem.userAnswer}">
|
||||
<view class="qitem-opt" :class="{check:curItem.userAnswer==true}">
|
||||
{{toLetter(1)}}.正确
|
||||
<u-icon v-if="curItem.answer && curItem.userAnswer" name="checkbox-mark" color="#00aa00"></u-icon>
|
||||
<u-icon v-if="curItem.userAnswer==true" name="checkbox-mark" color="#00aa00"></u-icon>
|
||||
</view>
|
||||
<view class="qitem-opt" :class="{check:!curItem.answer && !curItem.userAnswer}">
|
||||
<view class="qitem-opt" :class="{check:curItem.userAnswer==false}">
|
||||
{{toLetter(2)}}.错误
|
||||
<u-icon v-if="!curItem.answer && !curItem.userAnswer" name="checkbox-mark" color="#00aa00"></u-icon>
|
||||
<u-icon v-if="curItem.userAnswer==false" name="checkbox-mark" color="#00aa00"></u-icon>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
@@ -150,7 +150,7 @@
|
||||
|
||||
let $this=this;
|
||||
let item=this.curItem;
|
||||
//console.log(this.curItem,'curItem');
|
||||
console.log(this.curItem,'curItem');
|
||||
if(item.type!=3){
|
||||
item.optionList.forEach((opt,idx)=>{
|
||||
//填充正确答案,判断题不用处理
|
||||
@@ -162,8 +162,10 @@
|
||||
$this.userOptIdxs.push(idx);
|
||||
}
|
||||
}else if(item.type==2){ //多选
|
||||
if(item.userAnswer.indexOf(opt.id)>-1){
|
||||
$this.userOptIdxs.push(idx);
|
||||
if(item.userAnswer){
|
||||
if(item.userAnswer.indexOf(opt.id)>-1){
|
||||
$this.userOptIdxs.push(idx);
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user