index.wxml 6.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144
  1. <!--pages/analysis/index.wxml-->
  2. <view class='page'>
  3. <i-spin fix size="large" wx:if="{{loading}}"></i-spin>
  4. <view class="header-model2 css-shadow-bottom">
  5. <i-row>
  6. <i-col span="15" i-class="col-class-down">
  7. <text class="model2-timepiece">题目:{{result.questionMenu}}</text>
  8. </i-col>
  9. </i-row>
  10. </view>
  11. <!--题目-->
  12. <view style='padding-bottom:44px;'>
  13. <view class="question-list">
  14. <view class="question-list-title">
  15. <i-tag class="i-tags" name="单选" type="border" color="blue" wx:if="{{questionInfo.type==1}}">
  16. 单选
  17. </i-tag>
  18. <i-tag class="i-tags" name="多选" type="border" color="blue" wx:if="{{questionInfo.type==2}}">
  19. 多选
  20. </i-tag>
  21. <text class='question-title'>{{questionInfo.title}}</text>
  22. </view>
  23. </view>
  24. <image wx:if="{{questionInfo.picUrl}}" style="width: 100%; height: 200px; background-color: #fff;" mode="aspectFit" src="{{questionInfo.picUrl}}" data-src="{{questionInfo.picUrl}}" catchtap="showPic"></image>
  25. <audio wx:if="{{questionInfo.audio}}" style="width:{{windowWidth}}px;margin-bottom:10px;text-align:center;" src="{{questionInfo.audio}}" id="myAudio" controls loop></audio>
  26. <view wx:if="{{questionInfo.video}}" class='view' style='width:{{windowWidthpx}};height:225px;' bindtap='showVideo' hidden='{{showVideo}}'></view>
  27. <video wx:if="{{questionInfo.video}}" hidden='{{!showVideo}}' src="{{questionInfo.video}}" objectFit="cover" style="width:{{windowWidth}}px;margin-bottom:10px;" page-gesture="true" show-fullscreen-btn="false" id="myVideo" bindpause='hideVideo' bindended='hideVideo' controls>
  28. </video>
  29. <!--答案选择 - 单选-->
  30. <i-panel wx:if="{{questionInfo.type==1}}">
  31. <i-radio-group wx:for="{{questionInfo.choseList}}" wx:key="item.id" current="{{current}}">
  32. <i-radio disabled="{{disabled}}" position="left" value="{{s[index]}}{{item.item}}">
  33. </i-radio>
  34. </i-radio-group>
  35. </i-panel>
  36. <!--答案选择 - 多选-->
  37. <i-panel wx:if="{{questionInfo.type==2}}">
  38. <i-checkbox-group current="{{currentD}}" wx:for="{{questionInfo.choseList}}" wx:key="{{item.id}}">
  39. <i-checkbox disabled="{{disabled}}" wx:key="{{index}}" position="left" wx:key="{{item.id}}" value="{{s[index]}}{{item.item}}">
  40. </i-checkbox>
  41. </i-checkbox-group>
  42. </i-panel>
  43. <!--帮助-->
  44. <i-panel>
  45. <view>
  46. <view class='answer'>
  47. <view class='answerTitle'>正确答案:</view>
  48. <view class='answerContent'>
  49. <view wx:for="{{answer}}" wx:key="answer">{{item}}</view>
  50. </view>
  51. <view class='answerTitle'>你的答案:</view>
  52. <view wx:if="{{questionInfo.choose.length>0}}" class='answerContent'>
  53. <view wx:for="{{questionInfo.choose}}" wx:key="answer">{{item}}</view>
  54. </view>
  55. <view wx:else class='answerContent'>
  56. <view>空</view>
  57. </view>
  58. <view class='answerTitle'>解析:</view>
  59. <view wx:if="{{questionInfo.help !=''}}" class='answerContent'>
  60. {{questionInfo.help}}
  61. </view>
  62. </view>
  63. <image wx:if="{{questionInfo.helpPicUrl}}" style="width: 100%; height: 200px; background-color: #fff;padding:0;" mode="aspectFit" src="{{questionInfo.helpPicUrl}}" data-src="{{questionInfo.helpPicUrl}}" catchtap="showPic"></image>
  64. <audio wx:if="{{questionInfo.helpAudioUrl}}" style="width:{{windowWidth}}px;margin-bottom:10px;text-align:center;" src="{{questionInfo.helpAudioUrl}}" id="myAudio" controls loop></audio>
  65. <view wx:if="{{questionInfo.helpVideoUrl}}" class='view' style='width:{{windowWidthpx}};height:225px;' bindtap='showHelpVideo' hidden='{{showHelpVideo}}'></view>
  66. <video wx:if="{{questionInfo.helpVideoUrl}}" hidden='{{!showHelpVideo}}' src="{{questionInfo.helpVideoUrl}}" objectFit="cover" style="width:{{windowWidth}}px;margin-bottom:10px;" page-gesture="true" show-fullscreen-btn="false" id="helpVideo" bindpause='hideHelpVideo' bindended='hideHelpVideo' controls></video>
  67. <view wx:if="{{questionInfo.help == '' && questionInfo.helpPicUrl == '' && questionInfo.helpAudioUrl == '' && questionInfo.helpVideoUrl == '' }}" class='answerContent'>
  68. </view>
  69. </view>
  70. </i-panel>
  71. <!--底部栏-->
  72. <view class='css-shadow tab-bar'>
  73. <!-- 分页 -->
  74. <i-page current="{{ index+1 }}" total="total" bind:change="handlePageChange">
  75. <view slot="prev">
  76. <i-icon type="return"></i-icon>
  77. 上一题
  78. </view>
  79. <view slot="content">
  80. <i-row>
  81. <i-col span="23">
  82. <view>
  83. <button class="footer-defbtn" bindtap='handleOpen'>
  84. <i-icon type="task" size='25' color="#3D971C" class='footer-btn-text' />
  85. <view class='footer-btn-text'>
  86. <text>{{index+1}}/{{total}}</text>
  87. </view>
  88. </button>
  89. </view>
  90. </i-col>
  91. </i-row>
  92. </view>
  93. <view slot="next">
  94. <view style='height:100%;'>
  95. 下一题
  96. <i-icon type="enter"></i-icon>
  97. </view>
  98. </view>
  99. </i-page>
  100. </view>
  101. <!--下拉弹出-->
  102. <i-action-sheet visible="{{ actionVisible }}" actions="" bind:cancel="actionCancel" bind:click="actionClickItem">
  103. <view slot="header" style="padding:2px">
  104. <view class="i-action-header">
  105. <i-row>
  106. <i-col span="20" i-class="col-class">
  107. <view class="i-action-header-left">
  108. <text>正确: <text style="font-weight: bold;color:#3D971C">{{right}}</text></text>
  109. <text>错误: <text style="font-weight: bold;color:#A01E32">{{(wrong)}}</text></text>
  110. <text>正确率: <text style="font-weight: bold;color:#18836b">{{persent}}%</text></text>
  111. </view>
  112. </i-col>
  113. <i-col span="4" i-class="col-class">
  114. <view class="i-action-header-r">
  115. <button style="padding:0px;" bindtap="actionCancel" size="small">关闭</button>
  116. </view>
  117. </i-col>
  118. </i-row>
  119. </view>
  120. <scroll-view>
  121. <view class='i-action-ico'>
  122. <view wx:for="{{result.questionList}}" class="i-action-ico-bor" wx:for-index="idx" for:key="i" data-index="{{idx}}" bindtap='dump'>
  123. <view class=" {{item.judge==1?'succ':item.judge==0?'err':''}}">
  124. <i-icon type="right" color="#3D971C" wx:if="{{item.judge==1}}" size="14" />
  125. <i-icon type="close" color="#A01E32" wx:if="{{item.judge==0}}" size="14" />
  126. <text>{{idx+1}}</text>
  127. </view>
  128. </view>
  129. <!-- <view>1 </view> -->
  130. </view>
  131. </scroll-view>
  132. </view>
  133. </i-action-sheet>
  134. <!--下拉弹出-->
  135. </view>
  136. </view>