publisherQuestion.wxml 1.6 KB

123456789101112131415161718192021222324252627282930
  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="btn">
  18. <view class="save-btn primary-background-color white-text-color" data-id="{{item._id}}"
  19. data-answer="{{item.answer}}" bindtap="saveQuestion">保存</view>
  20. <view wx:if="{{top == false}}" class="top-btn primary-background-color white-text-color" bindtap="top">置顶提问</view>
  21. <view wx:if="{{top == true}}" class="top-btn third-background-color white-text-color" bindtap="top">取消置顶
  22. </view>
  23. </view>
  24. <icon style="position: absolute; top: 20rpx; right: 20rpx;" type="cancel" size="20" data-id="{{item._id}}"
  25. catchtap="removeQuestion"></icon>
  26. </view>
  27. </view>