index.wxml 3.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889
  1. <view class="exam-page">
  2. <view class="view-wrap">
  3. <view class="exam-count-down">{{remainTimeStr}}</view>
  4. </view>
  5. <view class="view-wrap-hidden">
  6. </view>
  7. <view>
  8. <view class="exam-name-title">
  9. <h1>{{info.title}}</h1>
  10. </view>
  11. <form bindsubmit='formSubmit'>
  12. <i-panel title="{{titleItem.title}}"
  13. wx:for="{{list}}"
  14. wx:for-item="item"
  15. wx:key="answerId"
  16. i-class="exam-panel-title">
  17. <i-cell-group i-class="exam-cell">
  18. <!-- 单选题 -->
  19. <i-cell wx:if="{{item.type==2}}">
  20. <view>
  21. <rich-text nodes="{{index+1}}.[单]{{item.title}}" />
  22. <radio-group class="radio-answer" bindchange="radioChange" data-index="{{index}}" >
  23. <label class="radio" wx:for="{{preList}}" wx:for-item="answer" wx:key="anserIndex" wx:if="{{item['answer'+(index+1)]}}">
  24. <view class="radio-answer">
  25. <radio color="#2d8cf0" value="{{index+1}}" checked="{{item.select==index+1}}" >
  26. {{preList[index]}}. {{item['answer'+(index+1)]}}
  27. </radio>
  28. </view>
  29. </label>
  30. </radio-group>
  31. </view>
  32. </i-cell>
  33. <!-- 多选题 -->
  34. <i-cell wx:if="{{item.type==3}}">
  35. <view >
  36. <text> {{index+1}}. [多]{{item.title}} </text>
  37. <checkbox-group class="checkbox-answer" style="margin-top:30rpx" bindchange="checkboxChange" data-index="{{index}}">
  38. <label class="checkbox" wx:for="{{preList}}" wx:for-item="answer" wx:if="{{item['answer'+(index+1)]}}">
  39. <view class="checkbox-answer">
  40. <checkbox color="#2d8cf0" value="{{index+1}}">
  41. {{answer}}. {{item['answer'+(index+1)]}}
  42. </checkbox>
  43. </view>
  44. </label>
  45. </checkbox-group>
  46. </view>
  47. </i-cell>
  48. <!-- 判断 -->
  49. <i-cell wx:if="{{item.type==1}}">
  50. <view>
  51. <rich-text nodes="{{index+1}}.[判]{{item.title}}" />
  52. <radio-group class="radio-answer" bindchange="radioChange" data-index="{{index}}" >
  53. <label class="radio" wx:for="{{2}}" wx:for-item="answer" >
  54. <view class="radio-answer">
  55. <radio color="#2d8cf0" value="{{index+1}}" checked="{{item.select==index+1}}" >
  56. {{preList[index]}}. {{item['answer'+(index+1)]}}
  57. </radio>
  58. </view>
  59. </label>
  60. </radio-group>
  61. </view>
  62. </i-cell>
  63. </i-cell-group>
  64. </i-panel>
  65. <view>
  66. <button class="i-btn i-btn-primary i-btn-square" form-type='submit'>提交</button>
  67. </view>
  68. <i-action-sheet visible="true" visible="{{timeOutShow}}" mask-closable="{{ false }}">
  69. <view slot="header" style="padding: 16px">
  70. <view class="exam-timeout-title">考试试卷结束,请提交试卷!</view>
  71. <button class="i-btn i-btn-primary i-btn-square" form-type='submit'>提交</button>
  72. </view>
  73. </i-action-sheet>
  74. </form>
  75. <i-modal title="考试结果" visible="{{modalShow}}" bind:ok="returnRecord" bind:cancel="returnRecord">
  76. <view>我的战绩:{{result.correct}} / {{result.counter}}</view>
  77. </i-modal>
  78. <i-spin size="large" fix wx:if="{{ spinShow }}"></i-spin>
  79. <i-message id="message" />
  80. </view>
  81. </view>