|  |  | 
 |  |  |       <view class="box_list_answer" v-if="list && list.length > 0"> | 
 |  |  |         <view v-if="status == 1 || status == 2" class="score_static"> | 
 |  |  |           <text class="name">本次得分:</text> | 
 |  |  |           <text class="num" :class="{warry: status == 2}">{{ score }}分</text> | 
 |  |  |           <text class="num" :class="{ warry: status == 2 }">{{ score }}分</text> | 
 |  |  |         </view> | 
 |  |  |         <!--    单选/判断   --> | 
 |  |  |         <view v-for="(item, index) in list" :key="index" class="list_item"> | 
 |  |  |           <view class="box_list_answer_name"> | 
 |  |  |             <text>{{ index + 1 }}、{{ item.title}}</text> | 
 |  |  |             <text>{{ index + 1 }}、{{ item.title }}</text> | 
 |  |  |             <text v-if="item.score"> ({{ item.score }}分)</text> | 
 |  |  |             <text style="color: #ed4545">*</text> | 
 |  |  |           </view> | 
 |  |  | 
 |  |  |             </view> | 
 |  |  |             <view | 
 |  |  |               class="box_list_answer_tips" | 
 |  |  |               style="margin-bottom: 0rpx" | 
 |  |  |               v-if=" | 
 |  |  |                 item.selAnswer && | 
 |  |  |                 item.answer !== item.selAnswer && | 
 |  |  |                 status != '0' | 
 |  |  |               " | 
 |  |  |             > | 
 |  |  |               <image src="@/static/ic_wrong@2x.png" /> | 
 |  |  |               <text>回答错误</text> | 
 |  |  |               <view class="line"> | 
 |  |  |                 <image src="@/static/ic_wrong@2x.png" /> | 
 |  |  |                 <text>回答错误</text> | 
 |  |  |               </view> | 
 |  |  |               <view class="line">正确答案:{{ item.answer }}</view> | 
 |  |  |             </view> | 
 |  |  |             <view | 
 |  |  |               class="box_list_answer_tips" | 
 |  |  | 
 |  |  |                 status != '0' | 
 |  |  |               " | 
 |  |  |             > | 
 |  |  |               <image src="@/static/ic_success@2.png" /> | 
 |  |  |               <text class="success">回答正确</text> | 
 |  |  |               <view class="line"> | 
 |  |  |                 <image src="@/static/ic_success@2.png" /> | 
 |  |  |                 <text class="success">回答正确</text> | 
 |  |  |               </view> | 
 |  |  |             </view> | 
 |  |  |           </template> | 
 |  |  |           <template v-if="item.type == 2"> | 
 |  |  | 
 |  |  |                 src="@/static/checkbo1x_sel@2x.png" | 
 |  |  |                 v-if=" | 
 |  |  |                   (line.checked && status != '2') || | 
 |  |  |                   (item.selAnswer === item.answer && | 
 |  |  |                     line.checked) | 
 |  |  |                   (item.selAnswer === item.answer && line.checked) | 
 |  |  |                 " | 
 |  |  |               /> | 
 |  |  |               <image | 
 |  |  | 
 |  |  |               <text | 
 |  |  |                 v-if=" | 
 |  |  |                   (line.checked && status != '2') || | 
 |  |  |                   (item.selAnswer === item.answer && | 
 |  |  |                     line.checked) | 
 |  |  |                   (item.selAnswer === item.answer && line.checked) | 
 |  |  |                 " | 
 |  |  |                 style="color: rgba(77, 153, 168, 1)" | 
 |  |  |                 ><text class="mr24" style="color: rgba(77, 153, 168, 1)">{{ | 
 |  |  | 
 |  |  |                 status != '0' | 
 |  |  |               " | 
 |  |  |             > | 
 |  |  |               <image src="@/static/ic_wrong@2x.png" /> | 
 |  |  |               <text>回答错误</text> | 
 |  |  |               <view class="line"> | 
 |  |  |                 <image src="@/static/ic_wrong@2x.png" /> | 
 |  |  |                 <text>回答错误</text> | 
 |  |  |               </view> | 
 |  |  |               <view class="line">正确答案:{{ item.answer }}</view> | 
 |  |  |             </view> | 
 |  |  |             <view | 
 |  |  |               class="box_list_answer_tips" | 
 |  |  | 
 |  |  |                 status != '0' | 
 |  |  |               " | 
 |  |  |             > | 
 |  |  |               <image src="@/static/ic_success@2.png" /> | 
 |  |  |               <text class="success">回答正确</text> | 
 |  |  |               <view class="line"> | 
 |  |  |                 <image src="@/static/ic_success@2.png" /> | 
 |  |  |                 <text class="success">回答正确</text> | 
 |  |  |               </view> | 
 |  |  |             </view> | 
 |  |  |           </template> | 
 |  |  |         </view> | 
 |  |  | 
 |  |  |       score: 0 | 
 |  |  |     } | 
 |  |  |   }, | 
 |  |  |   computed:{ | 
 |  |  |     answerIng(){ | 
 |  |  |   computed: { | 
 |  |  |     answerIng() { | 
 |  |  |       let count = 0 | 
 |  |  |       this.list.forEach(item => { | 
 |  |  |         if(item.selAnswer || item.selAnswer == 0){ | 
 |  |  |           count ++ | 
 |  |  |         if (item.selAnswer || item.selAnswer == 0) { | 
 |  |  |           count++ | 
 |  |  |         } | 
 |  |  |       }) | 
 |  |  |       return count === this.list.length | 
 |  |  | 
 |  |  |               item.status = '0' | 
 |  |  |               item.selAnswer = null | 
 |  |  |             }) | 
 |  |  |             console.log(res.data) | 
 |  |  |             this.list = res.data | 
 |  |  |           } | 
 |  |  |           // res.param.problemsDOList.forEach(item => { | 
 |  |  | 
 |  |  |     }, | 
 |  |  |     // 单选选择中题目 | 
 |  |  |     select(line, i) { | 
 |  |  |       if(this.status === '2') return | 
 |  |  |       if (this.status != '0') return | 
 |  |  |       this.list.forEach((item, index) => { | 
 |  |  |         if (index === i) { | 
 |  |  |           item.selAnswer = line.code | 
 |  |  | 
 |  |  |       // this.problemIndex = index | 
 |  |  |     }, | 
 |  |  |     changeBox(index, jeck) { | 
 |  |  |       if(this.status === '2') return | 
 |  |  |       if (this.status != '0') return | 
 |  |  |       this.list.forEach((item, i) => { | 
 |  |  |         if (index === i) { | 
 |  |  |           item.options.forEach((item2, j) => { | 
 |  |  | 
 |  |  |     }, | 
 |  |  |     // 下一题 | 
 |  |  |     onSubmit() { | 
 |  |  |       if(!this.answerIng) return | 
 |  |  |       if (!this.answerIng) return | 
 |  |  |       const { list } = this | 
 |  |  |       // 验证所有题目都有选项 | 
 |  |  |       let count = 0 | 
 |  |  | 
 |  |  |       list.forEach(item => { | 
 |  |  |         if (item.selAnswer !== item.answer) { | 
 |  |  |           flag++ | 
 |  |  |         }else{ | 
 |  |  |         } else { | 
 |  |  |           this.score += item.score | 
 |  |  |         } | 
 |  |  |       }) | 
 |  |  | 
 |  |  |         box-sizing: border-box; | 
 |  |  |         background: #f7f7f7; | 
 |  |  |         border-radius: 8rpx; | 
 |  |  |         display: flex; | 
 |  |  |         align-items: center; | 
 |  |  |         margin-bottom: 24rpx; | 
 |  |  |         .line { | 
 |  |  |           display: flex; | 
 |  |  |           align-items: center; | 
 |  |  |           font-size: 28rpx; | 
 |  |  |           color: #333333; | 
 |  |  |           margin-bottom: 20rpx; | 
 |  |  |           &:nth-last-child(1){ | 
 |  |  |             margin-bottom: 0; | 
 |  |  |           } | 
 |  |  |         } | 
 |  |  |         image { | 
 |  |  |           width: 28rpx; | 
 |  |  |           height: 28rpx; | 
 |  |  | 
 |  |  |         } | 
 |  |  |       } | 
 |  |  |     } | 
 |  |  |     .score_static{ | 
 |  |  |     .score_static { | 
 |  |  |       display: flex; | 
 |  |  |       font-size: 32rpx; | 
 |  |  |       margin-bottom: 40rpx; | 
 |  |  |       .name{ | 
 |  |  |       .name { | 
 |  |  |         font-weight: 600; | 
 |  |  |       } | 
 |  |  |       .num{ | 
 |  |  |       .num { | 
 |  |  |         color: $uni-color-primary; | 
 |  |  |       } | 
 |  |  |       .warry{ | 
 |  |  |         color: #ED4545; | 
 |  |  |       .warry { | 
 |  |  |         color: #ed4545; | 
 |  |  |       } | 
 |  |  |     } | 
 |  |  |     .list_item { | 
 |  |  | 
 |  |  |       font-size: 30rpx; | 
 |  |  |       color: #ffffff; | 
 |  |  |     } | 
 |  |  |     .disable{ | 
 |  |  |     .disable { | 
 |  |  |       background-color: #cccccc; | 
 |  |  |     } | 
 |  |  |   } |