receivedQuestion.wxml 1.3 KB

123456789101112131415
  1. <!--为发布者-我收到的问题页面-->
  2. <view wx:if="{{questions.length == 0}}" class="title primary-text-color" style="text-align: center;">这里空空如也</view>
  3. <checkbox-group wx:if="{{questions.length != 0}}" class="checkbox-group" bindchange="updateFilter">
  4. <view><checkbox class="checkbox" value="0" checked color="#3F51B5">未回答</checkbox></view>
  5. <view><checkbox class="checkbox" value="1" checked color="#3F51B5">已回答</checkbox></view>
  6. </checkbox-group>
  7. <view wx:for="{{questions}}" wx:for-item="item" wx:for-index="index" wx:key="_id">
  8. <view wx:if="{{notAnswered && item.answer == '' || answered && item.answer != ''}}" class="card">
  9. <view class="title dark-primary-color-font">{{item.title}}</view>
  10. <view class="question primary-text-color">问:{{item.question}}</view>
  11. <textarea class="answer block-background-color" value="{{item.answer}}" placeholder="填写回答" data-index="{{index}}" bindinput="updateText"></textarea>
  12. <view class="save-btn default-primary-color white-text-color" data-id="{{item._id}}" data-answer="{{item.answer}}" bindtap="saveQuestion">保存</view>
  13. <icon style="position: absolute; top: 0; right: 0;" type="cancel" size="20" data-id="{{item._id}}" catchtap="removeQuestion"></icon>
  14. </view>
  15. </view>