index.wxml 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  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. <image data-index="{{index}}" style="width: {{imgLi[index].width || 0}}px;height: {{imgLi[index].height || 0}}px" wx:if="{{item.img}}" src="{{item.img}}" bindload="loadimage"></image>
  17. <checkbox-group bindchange="changeGroup" wx:if="{{item.answer && item.answer.length > 1}}">
  18. <view style="padding: 23rpx 36rpx;" wx:for="{{item.options || []}}" wx:for-index="o" wx:for-item="v" wx:key="id">
  19. <label>
  20. <checkbox color="#2A9CEC" value="{{v.name}}" checked="{{v.checked}}" />{{v.option}}
  21. </label>
  22. </view>
  23. </checkbox-group>
  24. <radio-group bindchange="changeGroup" wx:else>
  25. <view style="padding: 23rpx 36rpx;" wx:for="{{item.options || []}}" wx:for-index="o" wx:for-item="v" wx:key="id">
  26. <label>
  27. <radio color="#2A9CEC" value="{{v.name}}" checked="{{v.checked}}" />{{v.option}}
  28. </label>
  29. </view>
  30. </radio-group>
  31. </scroll-view>
  32. </swiper-item>
  33. </block>
  34. </swiper>
  35. </view>
  36. <view class="foote flex" style="height: {{ height[0] + 'px;line-height:' + height[0] + 'px' }}">
  37. <view wx:if="{{data.current <= 1}}" style="color: #9e9e9e">
  38. <i-icon type="return"></i-icon>
  39. 上一题
  40. </view>
  41. <view wx:else bindtap="prov">
  42. <i-icon type="return"></i-icon>
  43. 上一题
  44. </view>
  45. <view class="Fcenter">{{data.current}}/{{data.total}}</view>
  46. <view wx:if="{{data.current >= data.total}}" style="padding-top: {{(height[0] - 29)/2}}px;">
  47. <button type="warn" size="mini" bindtap="submit">交卷</button>
  48. </view>
  49. <view wx:else bindtap="next">
  50. 下一题
  51. <i-icon type="enter"></i-icon>
  52. </view>
  53. </view>
  54. </view>