subject.wxml 1.4 KB

1234567891011121314151617181920212223242526272829
  1. <view class="top">
  2. 满分{{data.full_mark}}分/{{data.time_limit}}分钟
  3. <text bindtap="post">交卷</text>
  4. <view class="count">倒计时 {{time}}</view>
  5. </view>
  6. <!-- 判断 -->
  7. <view class="content" wx:for="{{data.questions}}" hidden="{{idx != index+1}}" wx:key="idx">
  8. <view class="num">{{index+1}}、{{item.title}}
  9. <image wx:if="{{item.type == 1}}" src="../../images/danx.svg" mode="widthFix"></image>
  10. <image wx:if="{{item.type == 2}}" src="../../images/duox.svg" mode="widthFix"></image>
  11. <image wx:if="{{item.type == 3}}" src="../../images/pd.svg" mode="widthFix"></image>
  12. </view>
  13. <!-- <view class="ques"> {{item.title}} </view> -->
  14. <view class="ans">
  15. <checkbox-group wx:if="{{item.type == 2}}" bindchange='answer' data-id='{{item.id}}'>
  16. <view wx:for="{{item.options}}" wx:for-item="opt" wx:key="*this">
  17. <checkbox color="#358BFF" value="{{opt[0]}}">{{opt}}</checkbox></view>
  18. </checkbox-group>
  19. <radio-group wx:else bindchange='answer' data-id='{{item.id}}'>
  20. <view wx:for="{{item.options}}" wx:for-item="opt" wx:key="*this">
  21. <radio color="#358BFF" value="{{opt[0]}}">{{opt}}</radio></view>
  22. </radio-group>
  23. </view>
  24. </view>
  25. <view class="btn">
  26. <text class="{{idx<=1?'hide':''}}" bindtap="prev">上一题</text>
  27. <text class="{{idx>=data.questions.length?'hide':''}}" bindtap="next">下一题</text>
  28. </view>