publisherQuestion.wxml 1.3 KB

12345678910111213141516171819202122232425
  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>
  5. <checkbox class="checkbox" value="0" checked color="#009195">未回答</checkbox>
  6. </view>
  7. <view>
  8. <checkbox class="checkbox" value="1" checked color="#009195">已回答</checkbox>
  9. </view>
  10. </checkbox-group>
  11. <view wx:for="{{questions}}" wx:for-item="item" wx:for-index="index" wx:key="_id">
  12. <view wx:if="{{notAnswered && item.answer == '' || answered && item.answer != ''}}" class="card">
  13. <view class="title">{{item.title}}</view>
  14. <view class="question primary-text-color">问:{{item.question}}</view>
  15. <textarea class="answer block-background-color" value="{{item.answer}}" placeholder="填写回答" data-index="{{index}}"
  16. bindinput="updateText"></textarea>
  17. <view class="save-btn primary-background-color white-text-color" data-id="{{item._id}}"
  18. data-answer="{{item.answer}}" bindtap="saveQuestion">保存</view>
  19. <icon style="position: absolute; top: 20rpx; right: 20rpx;" type="cancel" size="20" data-id="{{item._id}}"
  20. catchtap="removeQuestion"></icon>
  21. </view>
  22. </view>