index.wxml 3.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394
  1. <wxs module="filter" src="../../../wxs/exam-fun.wxs"></wxs>
  2. <view class="exam-page">
  3. <view class="view-wrap-hidden">
  4. </view>
  5. <view>
  6. <view class="exam-name-title">
  7. <h1>{{info.title}}</h1>
  8. </view>
  9. <view class="exam-result mt50">
  10. <h1 class=""> 试卷结果: {{info.correct}}/{{info.counter}}</h1>
  11. <h1 class="exam-result-detail">试卷耗时: {{info.useTime}}秒</h1>
  12. </view>
  13. <i-panel wx:for="{{answers}}" wx:for-item="item" wx:key="answerId" i-class="exam-panel-title">
  14. <i-cell-group i-class="exam-cell">
  15. <!-- 单选题 -->
  16. <i-cell wx:if="{{item.type==1}}">
  17. <view>
  18. <rich-text nodes="{{index+1}}.[单]{{item.title}}" />
  19. <radio-group class="radio-answer" >
  20. <label class="radio" wx:for="{{4}}" wx:for-item="answer" wx:key="anserIndex" >
  21. <view class="radio-answer">
  22. <radio color="#2d8cf0" value="{{index}}" checked="{{item.select==index}}" disabled>
  23. {{preList[index]}}. {{item['answer'+(index+1)]}}
  24. </radio>
  25. </view>
  26. </label>
  27. </radio-group>
  28. </view>
  29. </i-cell>
  30. <!-- 多选题 -->
  31. <i-cell wx:if="{{item.type==2}}">
  32. <view >
  33. <text> {{index+1}}. [多]{{item.title}} </text>
  34. <checkbox-group class="checkbox-answer" style="margin-top:30rpx" >
  35. <label class="checkbox" wx:for="{{4}}" wx:for-item="answer" wx:key="index" >
  36. <view class="checkbox-answer">
  37. <checkbox color="#2d8cf0" value="{{index}}" checked="{{filter.isSelect(index,item.select)}}" disabled>
  38. {{preList[index]}}. {{item['answer'+(index+1)]}}
  39. </checkbox>
  40. </view>
  41. </label>
  42. </checkbox-group>
  43. </view>
  44. </i-cell>
  45. <!-- 判断 -->
  46. <i-cell wx:if="{{item.type==3}}">
  47. <view>
  48. <rich-text nodes="{{index+1}}.[判]{{item.title}}" />
  49. <radio-group class="radio-answer" >
  50. <label class="radio" wx:for="{{2}}" wx:for-item="answer" wx:key="answerIndex" >
  51. <view class="radio-answer">
  52. <radio color="#2d8cf0" value="{{index}}" checked="{{item.select==index}}" disabled>
  53. {{preList[index]}}. {{item['answer'+(index+1)]}}
  54. </radio>
  55. </view>
  56. </label>
  57. </radio-group>
  58. </view>
  59. </i-cell>
  60. <view class="exam-clear">
  61. <view class="exam-extend-item" style="padding-left:0px">
  62. 结果:
  63. <text class="question-answer-right question-answer-result"
  64. wx:if="{{item.select==item.result}}">正确
  65. </text>
  66. <text class="question-answer-error question-answer-result"
  67. wx:else>错误</text>
  68. </view>
  69. <view class="exam-extend-item" style="padding-left:0px">
  70. 难度:
  71. <i-rate value="{{item.star||1}}" i-class="exam-item-rate" />
  72. </view>
  73. <view class="exam-extend-item">
  74. <rich-text nodes="解析: {{item.content||'无'}}" />
  75. </view>
  76. <view class="exam-extend-item">
  77. <text wx:if="{{item.type==1}}"> 正确答案: {{preList[item.result]}}</text>
  78. <text wx:elif="{{item.type==2}}"> 正确答案: {{filter.getMultResult(item.result)}}</text>
  79. <text wx:else> 正确答案: {{item.result==1?'正确':'错误'}}</text>
  80. </view>
  81. </view>
  82. </i-cell-group>
  83. </i-panel>
  84. <i-spin size="large" fix wx:if="{{ spinShow }}"></i-spin>
  85. <i-message id="message" />
  86. </view>
  87. </view>