new-ask.wxml 3.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879
  1. <view class="plv-mp-ask-wrap plv-mp-skin__{{ skin }}">
  2. <scroll-view
  3. id="scrollContent"
  4. scroll-y
  5. style="height: 100%"
  6. class="plv-mp-chatroom-scroll-view"
  7. scroll-top="{{ scrollToTop }}"
  8. bindscrolltoupper="scrollToUpper"
  9. bindscrolltolower="scrollToLower"
  10. bindscroll="viewScroll">
  11. <view id="askContent">
  12. <view class="plv-mp-ask__head">
  13. <picker bindchange="bindPickerChange" value="{{ pickIndex }}" range="{{ pickList }}">
  14. <view class="plv-mp-ask__picker">
  15. {{ pickIndex === 0 ? '全部' : pickList[pickIndex] }}
  16. </view>
  17. </picker>
  18. </view>
  19. <view
  20. class="plv-mp-ask-list"
  21. style="{{ showEdit ? 'padding-bottom: 54px' : '' }}"
  22. style="{{ showEdit && iPhoneX ? 'padding-bottom: 86px' : '' }}">
  23. <view
  24. id="QAContent{{ index }}"
  25. class="plv-mp-ask-list__item"
  26. wx:for="{{ listData }}"
  27. wx:key="index"
  28. wx:if="{{ !(item.answers.length === 0 && item.question.userId !== userId) }}">
  29. <view class="plv-mp-ask-body ask-question">
  30. <view class="plv-mp-ask-list__conent">问:
  31. <content-parser class="plv-mp-ask-component__content" content="{{ item.question.content }}" />
  32. </view>
  33. <text class="plv-mp-ask-list__text">{{ item.question.user.nick }}</text>
  34. <text class="plv-mp-ask-list__text">提问:{{ item.question.timestamp }}</text>
  35. <text
  36. wx:if="{{ userId === item.question.userId && item.answers.length > 0 }}"
  37. class="plv-mp-ask-list__me">@我</text>
  38. </view>
  39. <view
  40. class="plv-mp-ask-body ask-answer"
  41. wx:for="{{ item.answers }}"
  42. wx:for-item="i"
  43. wx:for-index="idx"
  44. id="answer{{ i.id }}"
  45. wx:key="id">
  46. <view class="plv-mp-ask-list__conent">{{ idx === 0 ? '答' : '追加' }}:
  47. <content-parser class="plv-mp-ask-component__content" content="{{ i.content }}" />
  48. </view>
  49. <text class="plv-mp-ask-list__text">{{ i.user.nick }}</text>
  50. <text class="plv-mp-ask-list__text">回复{{ i.timestamp }}</text>
  51. </view>
  52. </view>
  53. <view
  54. wx:if="{{ listData.length > 0 && (listData.length < 10 || noMoreMessage) }}"
  55. class="plv-mp-ask__empty__answer plv-mp-ask__lower">已经到最底啦~</view>
  56. <view
  57. class="plv-mp-ask__empty__answer"
  58. wx:if="{{ listData.length === 0 }}">暂无数据哦~</view>
  59. <view
  60. bindtap="chatEditShow"
  61. style="{{ iPhoneX ? 'bottom: 96px' : '64px' }}"
  62. class="plv-mp-ask-edit {{ liveType === 'end' ? 'edit-end' : '' }}">
  63. <image class="plv-mp-ask-edit__img" src="../../assets/images/edit.png" />
  64. </view>
  65. <button
  66. wx:if="{{ showMoreTips }}"
  67. bindtap="showReply"
  68. class="plv-mp-ask__new__msg">{{ btnTips }}</button>
  69. </view>
  70. </view>
  71. </scroll-view>
  72. <chat-edit
  73. wx:if="{{ showEdit }}"
  74. isAsk="true"
  75. skin="{{ skin }}"
  76. iPhoneX="{{ iPhoneX }}"
  77. bindsengmsg="handleSendMsg"
  78. />
  79. </view>