index.wxml 3.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889
  1. <wxs module="filter" src="../../../wxs/exam-fun.wxs"></wxs>
  2. <view class="exam-page p10">
  3. <view class="view-wrap">
  4. <view class="exam-count-down">{{remainTimeStr}}</view>
  5. </view>
  6. <view class="view-wrap-hidden">
  7. </view>
  8. <i-panel i-class="exam-panel-title" >
  9. <i-cell-group i-class="exam-cell">
  10. <!-- 单选题 -->
  11. <i-cell wx:if="{{item.type==2}}">
  12. <view>
  13. <rich-text nodes="[单]{{item.title}}" />
  14. <radio-group class="radio-answer" bindchange="radioChange" data-index="{{index}}">
  15. <label class="radio" wx:for="{{preList}}" wx:for-item="answer" wx:key="anserIndex"
  16. wx:if="{{item['answer'+(index+1)]}}">
  17. <view class="radio-answer">
  18. <radio color="#2d8cf0" value="{{index+1}}" checked="{{item.select==index+1}}">
  19. {{answer}}. {{item['answer'+(index+1)]}}
  20. </radio>
  21. </view>
  22. </label>
  23. </radio-group>
  24. </view>
  25. </i-cell>
  26. <!-- 多选题 -->
  27. <i-cell wx:if="{{item.type==3}}">
  28. <view>
  29. <text> [多]{{item.title}} </text>
  30. <checkbox-group class="checkbox-answer" style="margin-top:10rpx" bindchange="checkboxChange">
  31. <label class="checkbox" wx:for="{{preList}}" wx:key="index" wx:for-item="answer"
  32. wx:if="{{item['answer'+(index+1)]}}">
  33. <view class="checkbox-answer">
  34. <checkbox color="#2d8cf0" value="{{index+1}}" checked="{{filter.isSelect( index+1, item.select)}}">
  35. {{answer}}. {{item['answer'+(index+1)]}}
  36. </checkbox>
  37. </view>
  38. </label>
  39. </checkbox-group>
  40. </view>
  41. </i-cell>
  42. <!-- 判断 -->
  43. <i-cell wx:if="{{item.type==1}}">
  44. <view>
  45. <rich-text nodes="[判]{{item.title}}" />
  46. <radio-group class="radio-answer" bindchange="radioChange" data-index="{{index}}">
  47. <label class="radio" wx:for="{{2}}" wx:for-item="answer">
  48. <view class="radio-answer">
  49. <radio color="#2d8cf0" value="{{index+1}}" checked="{{item.select==index+1}}">
  50. {{preList[index]}}. {{item['answer'+(index+1)]}}
  51. </radio>
  52. </view>
  53. </label>
  54. </radio-group>
  55. </view>
  56. </i-cell>
  57. </i-cell-group>
  58. <view class="tc">
  59. <button type="primary" size="mini" bindtap='nextAnswer'>下一题</button>
  60. <button type="primary" size="mini" bindtap='dosubmit' class="ml20">交卷</button>
  61. </view>
  62. </i-panel>
  63. </view>
  64. <view class="bg-white p20">
  65. <i-row wx:for="{{10}}" wx:for-index="row">
  66. <i-col wx:for="{{5}}" wx:for-index="cell" style="float:left;width:20%;text-alignP:center">
  67. <view class="item-select {{filter.isExamSelect( 5*row+cell, info)}} "
  68. bindtap="selectquestion" data-index="{{5*row+cell}}" > {{5*row+cell+1}} </view>
  69. </i-col>
  70. </i-row>
  71. </view>
  72. <i-modal title="考试结果" visible="{{modalShow}}" bind:ok="returnRecord" bind:cancel="returnRecord">
  73. <view>我的战绩:{{score}} </view>
  74. </i-modal>
  75. <i-action-sheet visible="true" visible="{{timeOutShow}}" mask-closable="{{ false }}">
  76. <view slot="header" style="padding: 16px">
  77. <view class="exam-timeout-title">考试试卷结束,请提交试卷!</view>
  78. <button class="i-btn i-btn-primary i-btn-square" bindtap='dosubmit'>提交</button>
  79. </view>
  80. </i-action-sheet>