examDetail.wxml 2.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. <view class="container">
  2. <van-image width="750rpx" height="1150rpx" src="/images/ic_exam_bg.png" class="exam-bg"/>
  3. <van-image width="690rpx" height="90vh" src="/images/ic_exam_page.png" class="page-bg" wx:if="{{exams.length>0}}"/>
  4. <van-image width="52rpx" height="60rpx" src="/images/ic_exam_title.png" class="tag-bg" wx:if="{{exams.length>0}}"/>
  5. <view class="content" wx:if="{{exams.length>0}}">
  6. <view class="title">
  7. 第{{current + 1}}/{{exams.length}}题({{qType[question.questionType]}})
  8. </view>
  9. <view class="question">
  10. {{question.stem}}
  11. </view>
  12. <view wx:if="{{question.questionType == questionTypesEnum.SINGLE || question.questionType == questionTypesEnum.MULTIPLE}}">
  13. <view class="opt {{answers[question.id][item.id]?'opt-active':'opt-default'}}"
  14. wx:for="{{question.testAnswerList}}"
  15. wx:key="index"
  16. bind:tap="slectAnswer"
  17. data-id="{{item.id}}"
  18. >
  19. <view class="space">
  20. {{item.opt}}. {{item.answer}}
  21. </view>
  22. <view class="opt-btn" wx:if="{{answers[question.id][item.id]}}">
  23. <van-image width="30rpx" height="23rpx" src="/images/ic_exam_ok.png"/>
  24. </view>
  25. </view>
  26. </view>
  27. <van-field
  28. wx:else
  29. type="textarea"
  30. custom-style="padding: 21rpx 35rpx;font-size: 28rpx;margin-top: 50rpx;border: 1rpx solid #CED8EA;border-radius: 8rpx;"
  31. value="{{answers[question.id]}}"
  32. bind:change="onChange"
  33. autosize
  34. placeholder="请输入答案"
  35. input-class="input-class"
  36. placeholder-style="color: #889AB8;"
  37. border="{{ false }}"
  38. />
  39. <view class="mt100"></view>
  40. <van-button round color="linear-gradient(90deg, #FF4330 0%, #FF7B60 100%)" custom-class='next-btn'
  41. bind:click="toPre" wx:if="{{current!=0}}">上一题
  42. </van-button>
  43. <van-button round color="linear-gradient(90deg, #FF4330 0%, #FF7B60 100%)" custom-class='next-btn'
  44. bind:click="toNext" wx:if="{{current!=exams.length-1}}">下一题
  45. </van-button>
  46. <van-button round color="linear-gradient(90deg, #FF4330 0%, #FF7B60 100%)" custom-class='next-btn'
  47. bind:click="toPut" wx:if="{{current==exams.length-1}}">提交答案
  48. </van-button>
  49. </view>
  50. <edu-safe-area/>
  51. </view>