index.wxml 3.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596
  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:30rpx" 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">
  65. <i-row >
  66. <i-col span="4" wx:for="{{30}}" i-class="col-class">
  67. <view class="item-select {{info.answers[index].select>0?'is-select':''}}" bindtap="selectquestion" data-index="{{index}}" > {{index+1}} </view>
  68. </i-col>
  69. <i-col span="4" wx:for="{{10}}" i-class="col-class" >
  70. <view class="item-select {{info.answers[index+30].select>0?'is-select':''}}" bindtap="selectquestion" data-index="{{index+30}}"> {{index+31}} </view>
  71. </i-col>
  72. <i-col span="4" wx:for="{{10}}" i-class="col-class" >
  73. <view class="item-select {{info.answers[index+40].select>0?'is-select':''}}" bindtap="selectquestion" data-index="{{index+40}}"> {{index+41}} </view>
  74. </i-col>
  75. </i-row>
  76. </view>
  77. <i-modal title="考试结果" visible="{{modalShow}}" bind:ok="returnRecord" bind:cancel="returnRecord">
  78. <view>我的战绩:{{score}} </view>
  79. </i-modal>
  80. <i-action-sheet visible="true" visible="{{timeOutShow}}" mask-closable="{{ false }}">
  81. <view slot="header" style="padding: 16px">
  82. <view class="exam-timeout-title">考试试卷结束,请提交试卷!</view>
  83. <button class="i-btn i-btn-primary i-btn-square" bindtap='dosubmit'>提交</button>
  84. </view>
  85. </i-action-sheet>