1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556 |
- <view class="container">
- <van-image width="750rpx" height="1150rpx" src="/images/ic_exam_bg.png" class="exam-bg"/>
- <van-image width="690rpx" height="90vh" src="/images/ic_exam_page.png" class="page-bg" wx:if="{{exams.length>0}}"/>
- <van-image width="52rpx" height="60rpx" src="/images/ic_exam_title.png" class="tag-bg" wx:if="{{exams.length>0}}"/>
- <view class="content" wx:if="{{exams.length>0}}">
- <view class="title">
- 第{{current + 1}}/{{exams.length}}题({{qType[question.questionType]}})
- </view>
- <view class="question">
- {{question.stem}}
- </view>
- <view wx:if="{{question.questionType == questionTypesEnum.SINGLE || question.questionType == questionTypesEnum.MULTIPLE}}">
- <view class="opt {{answers[question.id][item.id]?'opt-active':'opt-default'}}"
- wx:for="{{question.testAnswerList}}"
- wx:key="index"
- bind:tap="slectAnswer"
- data-id="{{item.id}}"
- >
- <view class="space">
- {{item.opt}}. {{item.answer}}
- </view>
- <view class="opt-btn" wx:if="{{answers[question.id][item.id]}}">
- <van-image width="30rpx" height="23rpx" src="/images/ic_exam_ok.png"/>
- </view>
- </view>
- </view>
- <van-field
- wx:else
- type="textarea"
- custom-style="padding: 21rpx 35rpx;font-size: 28rpx;margin-top: 50rpx;border: 1rpx solid #CED8EA;border-radius: 8rpx;"
- value="{{answers[question.id]}}"
- bind:change="onChange"
- autosize
- placeholder="请输入答案"
- input-class="input-class"
- placeholder-style="color: #889AB8;"
- border="{{ false }}"
- />
- <view class="mt100"></view>
- <van-button round color="linear-gradient(90deg, #FF4330 0%, #FF7B60 100%)" custom-class='next-btn'
- bind:click="toPre" wx:if="{{current!=0}}">上一题
- </van-button>
- <van-button round color="linear-gradient(90deg, #FF4330 0%, #FF7B60 100%)" custom-class='next-btn'
- bind:click="toNext" wx:if="{{current!=exams.length-1}}">下一题
- </van-button>
- <van-button round color="linear-gradient(90deg, #FF4330 0%, #FF7B60 100%)" custom-class='next-btn'
- bind:click="toPut" wx:if="{{current==exams.length-1}}">提交答案
- </van-button>
- </view>
- <edu-safe-area/>
- </view>
|