aqyj/pages/exercise/main.wxml

61 lines
3.4 KiB
Plaintext

<!--pages/examtest/main.wxml-->
<view class="head">
<view style="float:left">题量 {{tmIndex+1}}/{{tmtotal}}</view>
</view>
<scroll-view class='body-v' scroll-y>
<view class="weui-article">
<view class="weui-article__h2">{{tmIndex+1}}.
<span wx:if="{{currentTm.type==1}}" class="txlabel">单选题</span>
<span wx:if="{{currentTm.type==2}}" class="txlabel">多选题</span>
<span wx:if="{{currentTm.type==3}}" class="txlabel">判断题</span>
</view>
<view class="weui-article__title">{{currentTm.title}}</view>
</view>
<radio-group bindchange="radioChange" wx:if="{{(currentTm.type==1 ||currentTm.type==3)}}">
<label class="weui-cell weui-check__label" wx:for="{{answerChoices}}" wx:key="value">
<radio class="weui-check" value="{{item.value}}" checked="{{item.checked}}" />
<view wx:if="{{currentTm.answer[item.value]!=''}}">
<view class="weui-cell__bd" wx:if="{{item.right}}" style="color:green;font-weight:bold">{{item.name}}: {{currentTm.answer[item.value]}}</view>
<view class="weui-cell__bd" wx:else>{{item.name}}: {{currentTm.answer[item.value]}}</view>
</view>
<view class="weui-cell__ft weui-cell__ft_in-radio" wx:if="{{item.checked}}">
<icon class="weui-icon-radio" type="success_no_circle" size="16"></icon>
</view>
</label>
</radio-group>
<checkbox-group bindchange="checkboxChange" wx:if="{{currentTm.type==2}}">
<label class="weui-cell weui-check__label" wx:for="{{answerChoices}}" wx:key="value">
<checkbox class="weui-check" value="{{item.value}}" checked="{{item.checked}}" />
<view class="weui-cell__bd" wx:if="{{item.right}}" style="color:green;font-weight:bold">{{item.name}}: {{currentTm.answer[item.value]}}</view>
<view class="weui-cell__bd" wx:else>{{item.name}}: {{currentTm.answer[item.value]}}</view>
<view class="weui-cell__hd weui-check__hd_in-checkbox">
<icon class="weui-icon-checkbox_circle" type="circle" size="23" wx:if="{{!item.checked}}"></icon>
<icon class="weui-icon-checkbox_success" type="success" size="23" wx:if="{{item.checked}}"></icon>
</view>
</label>
</checkbox-group>
<view class="weui-article" wx:if="{{answerP}}">
<view class="weui-article__h2" wx:if="{{answerright}}" style="color:green;font-weight:bold">回答正确!</view>
<view class="weui-article__h2" wx:else style="color:red;font-weight:bold">回答错误!</view>
<view class="weui-article__h2">正确答案是{{currentTm.right}},你的答案是{{currentTm.userchecked}}</view>
<!-- <view class="weui-article__h2" style="color:green" wx:if="{{currentTm.iscore == currentTm.score}}">回答正确</view>
<view class="weui-article__h2" style="color:red" wx:else>回答有误</view> -->
<view class="weui-article__title" wx:if="{{currentTm.resoluation != null}}">
<span style="color:blue">解析: </span>{{currentTm.resoluation}}</view>
<view class="weui-article__title" wx:else>
<span style="color:blue">解析: </span>无</view>
</view>
</scroll-view>
<view class="footer">
<view style="width:30%;float:left">
<button class="weui-btn" type="primary" bindtap="previous" disabled="{{tmIndex==0}}">上一题</button>
</view>
<view style="width:30%;float:left">
<button class="weui-btn" type="primary" bindtap="next" disabled="{{tmIndex==tmtotal-1}}">下一题</button>
</view>
<view style="width:40%;float:right">
<button class="weui-btn" type="primary" bindtap="showanswer">查看答案</button>
</view>
</view>