examtest_mp/pages/lianxi/main.wxml

118 lines
5.3 KiB
Plaintext

<view class="page">
<!-- <view class="head">
<view style="width:50%">
<span style="margin-left:10px">题量: {{tm_index+1}}/{{tmtotal}}</span>
</view>
<view style="width:50%;text-align:right" bindtap="changeM">
<span style="margin-right:10px"><span style="font-weight:bold;">{{moShi}}</span>
(点击切换)</span>
</view>
</view> -->
<view class="head">
<view class="typeBtns">
<view class="typeBtn typeBtn1 {{isTest ? 'datiBtn' : 'beitiBtn'}}" bindtap="changeM">背题模式</view>
<view class="typeBtn {{!isTest ? 'datiBtn' : 'beitiBtn'}}" bindtap="changeM">看题模式</view>
</view>
<view style="position: absolute;bottom: 10rpx;right: 20rpx;" bindtap="showCard">
<span style="margin-left:10px" bindtap="showCard">{{tm_index+1}} / {{tmtotal}}</span>
</view>
</view>
<scroll-view scroll-y="true" style="height: {{scrollHeight}}px;">
<view class="weui-article">
<view class="weui-article__h2">{{tm_index+1}}.
<span class="txlabel">{{tm_current.type}}</span>
</view>
<view class="weui-article__title">
<mp-html content="{{tm_current.name}}" />
</view>
<view wx:if="{{tm_current.img}}" style="text-align:center"><image src="{{tm_current.img}}" mode="aspectFit"></image></view>
</view>
<!-- 单选 判断 -->
<view class="weui-cells weui-cells_radio">
<radio-group class="radio-group" bindchange="radioChange" wx:if="{{(tm_current.type=='单选' ||tm_current.type=='判断')}}">
<label class="weui-cell weui-cell_active weui-check__label" wx:for="{{options}}" wx:key="key">
<view class="weui-cell__bd" >
<view style="font-weight:bold;color:green" wx:if="{{ !isTest && item.right}}">
<view style="float:left;width:10%">{{item.key}}</view>
<view style="float:left;width:90%">
<mp-html content="{{item.value}}" />
</view>
</view>
<view wx:else>
<view style="float:left;width:10%">{{item.key}}:</view>
<view style="float:left;width:90%">
<mp-html content="{{item.value}}" />
</view>
</view>
</view>
<view class="weui-cell__ft">
<radio class="weui-check" value="{{item.key}}" checked="{{item.checked}}" />
<i class="weui-icon-checked"></i>
</view>
</label>
</radio-group>
</view>
<!-- 多选 -->
<view class="weui-cells weui-cells_checkbox">
<checkbox-group bindchange="checkboxChange" wx:if="{{tm_current.type=='多选'}}">
<label class="weui-cell weui-cell_active weui-check__label" wx:for="{{options}}" wx:key="key">
<view class="weui-cell__bd" >
<view style="font-weight:bold;color:green" wx:if="{{ !isTest && item.right}}">
<view style="float:left;width:10%">{{item.key}}.</view>
<view style="float:left;width:90%">
<mp-html content="{{item.value}}" domain="{{domain}}"/>
</view>
</view>
<view wx:else>
<view style="float:left;width:10%">{{item.key}}.</view>
<view style="float:left;width:90%">
<mp-html content="{{item.value}}" domain="{{domain}}"/>
</view>
</view>
</view>
<view class="weui-cell__hd">
<checkbox class="weui-check" value="{{item.key}}" checked="{{item.checked}}"/>
<i class="weui-icon-checked"></i>
</view>
</label>
</checkbox-group>
</view>
<view class="weui-article" wx:if="{{answerP||!isTest}}">
<view class="weui-article__h2" wx:if="{{isright&&isTest}}" style="color:green;font-weight:bold">回答正确!</view>
<view class="weui-article__h2" wx:if="{{!isright&&isTest}}" style="color:red;font-weight:bold">回答有误!</view>
<view class="weui-article__h2">正确答案: {{tm_current.right}}
<text wx:if="{{isTest}}">,你的答案:{{tm_current.user_answer}}</text>
</view>
<view class="weui-article__title" style="font-size: 30rpx;">
<span style="color:#438af4;font-weight: bold;font-size: 34rpx;">解析: </span>
<span wx:if="{{tm_current.question.resolution}}">{{tm_current.question.resolution}}</span>
<span wx:else>暂无解析</span>
</view>
</view>
</scroll-view>
<view class="btns footerBtns">
<view style="width:25%">
<button type="primary" size="mini" bindtap="previous" disabled="{{tm_index==0}}">上题</button>
</view>
<view style="width:25%">
<button type="primary" size="mini" bindtap="next" disabled="{{tm_index==tmtotal-1}}">下题</button>
</view>
<view style="width:25%">
<button type="primary" size="mini" bindtap="showAnswer">答案</button>
</view>
<view style="width:25%">
<image style="width: 60rpx;" mode="widthFix" src="/images/shoucang.png" bindtap="shoucang" wx:if="{{tm_current.is_collect}}"></image>
<image style="width:60rpx;" mode="widthFix" src="/images/shoucang1.png" bindtap="shoucang" wx:else></image>
</view>
</view>
</view>
<mp-halfScreenDialog wx:if="{{processCard}}" title="答题卡">
<view slot="desc" style="width: 100%;height: 431px;position: fixed;bottom: 0;left: 0;background: #ffffff;z-index: 100;border-top: 1rpx solid #dddddd;border-radius: 20rpx; padding: 20rpx;box-sizing: border-box;">
<view style="text-align: center;" bindtap="closeShowCard">答题卡</view>
<view>
<view class=""></view>
</view>
ddddddddddddd
</view>
</mp-halfScreenDialog>