index.wxml 3.9 KB

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