index.wxml 2.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. <!--miniprogram/pages/answer/index.wxml-->
  2. <view class="questionPage">
  3. <view class="head" style="height: {{'' + height[0] + 'px;line-height:' + height[0] + 'px' }}">
  4. <view>{{countDown}}</view>
  5. </view>
  6. <view class="body" style="height: {{height[1]}}px">
  7. <swiper style="height:{{height[1]}}px" bindchange="changeSwiper" indicator-dots="{{false}}" current="{{data.current - 1}}">
  8. <block wx:for="{{list}}" wx:key="id">
  9. <swiper-item>
  10. <scroll-view scroll-y="{{true}}" style="height: {{height[1]}}px">
  11. <view style="padding: 23rpx 36rpx;">
  12. <text class="queType" wx:if="{{item.answer && item.answer.length > 1}}">多选</text>
  13. <text class="queType" wx:else>单选</text>
  14. 题目:{{item.question}}
  15. </view>
  16. <checkbox-group bindchange="changeGroup" wx:if="{{item.answer && item.answer.length > 1}}">
  17. <view style="padding: 23rpx 36rpx;" wx:for="{{item.options || []}}" wx:for-index="o" wx:for-item="v" wx:key="id">
  18. <label>
  19. <checkbox color="#2A9CEC" value="{{v.name}}" checked="{{v.checked}}" />{{v.option}}
  20. </label>
  21. </view>
  22. </checkbox-group>
  23. <radio-group bindchange="changeGroup" wx:else>
  24. <view style="padding: 23rpx 36rpx;" wx:for="{{item.options || []}}" wx:for-index="o" wx:for-item="v" wx:key="id">
  25. <label>
  26. <radio color="#2A9CEC" value="{{v.name}}" checked="{{v.checked}}" />{{v.option}}
  27. </label>
  28. </view>
  29. </radio-group>
  30. </scroll-view>
  31. </swiper-item>
  32. </block>
  33. </swiper>
  34. </view>
  35. <view class="foote flex" style="height: {{ height[0] + 'px;line-height:' + height[0] + 'px' }}">
  36. <view wx:if="{{data.current <= 1}}" style="color: #9e9e9e">
  37. <i-icon type="return"></i-icon>
  38. 上一题
  39. </view>
  40. <view wx:else bindtap="prov">
  41. <i-icon type="return"></i-icon>
  42. 上一题
  43. </view>
  44. <view class="Fcenter">{{data.current}}/{{data.total}}</view>
  45. <view wx:if="{{data.current >= data.total}}" style="padding-top: {{(height[0] - 29)/2}}px;">
  46. <button type="warn" size="mini" bindtap="submit">交卷</button>
  47. </view>
  48. <view wx:else bindtap="next">
  49. 下一题
  50. <i-icon type="enter"></i-icon>
  51. </view>
  52. </view>
  53. </view>