|
@@ -1,29 +1,91 @@
|
|
-<view class="top">
|
|
|
|
- 满分{{data.full_mark}}分/{{data.time_limit}}分钟
|
|
|
|
- <text bindtap="post">交卷</text>
|
|
|
|
- <view class="count">倒计时 {{time}}</view>
|
|
|
|
|
|
+<wxs module="util" src="../../utils/pub.wxs"></wxs>
|
|
|
|
+<view class="top" wx:if="{{status != 1}}">
|
|
|
|
+ <text bindtap="openAns">答题卡</text>
|
|
|
|
+ 总题数:{{idx}}/{{data.questions.length}}
|
|
|
|
+ <view>{{time}}</view>
|
|
|
|
+
|
|
|
|
+</view>
|
|
|
|
+<view class="top" wx:else>
|
|
|
|
+ <text bindtap="reDo">重做试卷</text>
|
|
|
|
+ 总题数 <view>{{idx}}/{{data.questions.length}}</view>
|
|
</view>
|
|
</view>
|
|
<!-- 判断 -->
|
|
<!-- 判断 -->
|
|
<view class="content" wx:for="{{data.questions}}" hidden="{{idx != index+1}}" wx:key="idx">
|
|
<view class="content" wx:for="{{data.questions}}" hidden="{{idx != index+1}}" wx:key="idx">
|
|
- <view class="num">{{index+1}}、{{item.title}}
|
|
|
|
- <image wx:if="{{item.type == 1}}" src="../../images/danx.svg" mode="widthFix"></image>
|
|
|
|
- <image wx:if="{{item.type == 2}}" src="../../images/duox.svg" mode="widthFix"></image>
|
|
|
|
- <image wx:if="{{item.type == 3}}" src="../../images/pd.svg" mode="widthFix"></image>
|
|
|
|
|
|
+ <view class="num">{{index+1}}、
|
|
|
|
+ <view>
|
|
|
|
+ <image wx:if="{{item.qtype == 1}}" src="../../images/danx.svg" mode="widthFix"></image>
|
|
|
|
+ <image wx:if="{{item.qtype == 2}}" src="../../images/duox.svg" mode="widthFix"></image>
|
|
|
|
+ <image wx:if="{{item.qtype == 3}}" src="../../images/pd.svg" mode="widthFix"></image>
|
|
|
|
+ {{item.title}}
|
|
|
|
+ </view>
|
|
</view>
|
|
</view>
|
|
<!-- <view class="ques"> {{item.title}} </view> -->
|
|
<!-- <view class="ques"> {{item.title}} </view> -->
|
|
- <view class="ans">
|
|
|
|
- <checkbox-group wx:if="{{item.type == 2}}" bindchange='answer' data-id='{{item.id}}'>
|
|
|
|
|
|
+ <view class="ans" wx:if="{{status}}">
|
|
|
|
+ <view class="option" wx:for="{{item.options}}" wx:for-item="opt" wx:key="*this" wx:if='{{item.qtype == 1}}'>
|
|
|
|
+ <view wx:if='{{opt[0] == item.answer}}' class="correct">
|
|
|
|
+ {{opt}}
|
|
|
|
+ </view>
|
|
|
|
+ <view wx:elif='{{opt[0] == item.post_answer && !item.correct}}' class="error">
|
|
|
|
+ {{opt}}
|
|
|
|
+ </view>
|
|
|
|
+ <view wx:else>
|
|
|
|
+ {{opt}}
|
|
|
|
+ </view>
|
|
|
|
+ </view>
|
|
|
|
+ <view class="option" wx:for="{{item.options}}" wx:for-item="opt" wx:key="*this" wx:if='{{item.qtype == 2}}'>
|
|
|
|
+ <view wx:if='{{util.includes(item.post_answer, opt[0]) && item.correct}}' class="correct">
|
|
|
|
+ {{opt}}
|
|
|
|
+ </view>
|
|
|
|
+ <view wx:elif='{{util.includes(item.post_answer, opt[0]) && !item.correct}}' class="error">
|
|
|
|
+ {{opt}}
|
|
|
|
+ </view>
|
|
|
|
+ <view wx:else>
|
|
|
|
+ {{opt}}
|
|
|
|
+ </view>
|
|
|
|
+ </view>
|
|
|
|
+ <view class="option" wx:if='{{item.qtype == 3}}' wx:for="{{flag}}" wx:for-item="opt">
|
|
|
|
+ <view wx:if='{{opt.value == item.answer}}' class="correct">{{opt.name}}</view>
|
|
|
|
+ <view wx:elif='{{opt.value == item.post_answer && !item.correct}}' class="error">{{opt.name}}</view>
|
|
|
|
+ <view wx:else>{{opt.name}}</view>
|
|
|
|
+ </view>
|
|
|
|
+ <view>
|
|
|
|
+ <view style="color:#000;margin-bottom: 15rpx;"><text style="color: #666;">正确答案:</text>{{item.answer}}
|
|
|
|
+ <text style="padding: 0 10px;"></text>
|
|
|
|
+ <text style="color: #666;">您的答案:</text>{{item.post_answer?item.post_answer:''}}
|
|
|
|
+ </view>
|
|
|
|
+ <view style="color:#666">答案解析:</view>
|
|
|
|
+ <view class="analysis">{{item.analysis}}</view>
|
|
|
|
+ </view>
|
|
|
|
+ </view>
|
|
|
|
+
|
|
|
|
+ <view class="ans" wx:if="{{!status}}">
|
|
|
|
+
|
|
|
|
+ <radio-group class="option" wx:if="{{item.qtype == 3}}" bindchange='answer' data-id='{{item.id}}'>
|
|
|
|
+ <view><radio color="#358BFF" value="对">正确</radio></view>
|
|
|
|
+ <view><radio color="#358BFF" value="错">错误</radio></view>
|
|
|
|
+ </radio-group>
|
|
|
|
+ <checkbox-group class="option" wx:elif="{{item.qtype == 2}}" bindchange='answer' data-id='{{item.id}}'>
|
|
<view wx:for="{{item.options}}" wx:for-item="opt" wx:key="*this">
|
|
<view wx:for="{{item.options}}" wx:for-item="opt" wx:key="*this">
|
|
<checkbox color="#358BFF" value="{{opt[0]}}">{{opt}}</checkbox></view>
|
|
<checkbox color="#358BFF" value="{{opt[0]}}">{{opt}}</checkbox></view>
|
|
</checkbox-group>
|
|
</checkbox-group>
|
|
<radio-group wx:else bindchange='answer' data-id='{{item.id}}'>
|
|
<radio-group wx:else bindchange='answer' data-id='{{item.id}}'>
|
|
<view wx:for="{{item.options}}" wx:for-item="opt" wx:key="*this">
|
|
<view wx:for="{{item.options}}" wx:for-item="opt" wx:key="*this">
|
|
- <radio color="#358BFF" value="{{opt[0]}}">{{opt}}</radio></view>
|
|
|
|
- </radio-group>
|
|
|
|
|
|
+ <radio color="#358BFF" value="{{opt[0]}}">{{opt}}</radio>
|
|
|
|
+ </view>
|
|
|
|
+ </radio-group>
|
|
</view>
|
|
</view>
|
|
|
|
+
|
|
</view>
|
|
</view>
|
|
|
|
|
|
<view class="btn">
|
|
<view class="btn">
|
|
<text class="{{idx<=1?'hide':''}}" bindtap="prev">上一题</text>
|
|
<text class="{{idx<=1?'hide':''}}" bindtap="prev">上一题</text>
|
|
<text class="{{idx>=data.questions.length?'hide':''}}" bindtap="next">下一题</text>
|
|
<text class="{{idx>=data.questions.length?'hide':''}}" bindtap="next">下一题</text>
|
|
|
|
+ <view bindtap="post" wx:if='{{status != 1}}'>交卷</view>
|
|
|
|
+</view>
|
|
|
|
+
|
|
|
|
+<view class="ans_bg" wx:if='{{show}}'>
|
|
|
|
+ <view class="ans_card">
|
|
|
|
+ <view>答题卡 <image bindtap="closeAns" class="close" mode="widthFix" src="../../images/back.png"></image></view>
|
|
|
|
+ <text wx:for="{{data.questions}}" class="{{item.post_answer ? 'act':''}}" bindtap="skip" data-id='{{index}}'>{{index+1}}</text>
|
|
|
|
+ </view>
|
|
</view>
|
|
</view>
|