chat-list.wxml 3.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. <view class="plv-mp-chat-list-wrap plv-mp-skin__{{ skin }}">
  2. <view wx:if="{{ hasMore }}" class="plv-mp-chat-list-show-more" bindtap="tapSeeMore">查看更多</view>
  3. <view class="plv-mp-chat-list-list">
  4. <view class="plv-mp-chat-list-item" wx:for="{{ chatList }}" wx:for-index="index" wx:for-item="item" wx:key="id">
  5. <!-- 是否只看主持人 -->
  6. <block wx:if="{{ !isOnlyHost || (isOnlyHost && (item.system || item.actor || item.user.actor || item.currentUser)) }}">
  7. <!-- 打赏 -->
  8. <view wx:if="{{ item.reward }}" class="plv-mp-chat-list-msg-flower">
  9. <view wx:if="{{ item.content.gimg }}" class="plv-chat-list-flower__view">
  10. {{ item.content.unick }} 赠送了 {{ item.content.rewardContent }} <image mode="aspectFill" src="{{ item.content.gimg }}" class="plv-mp-chat-list-icon__flower" />
  11. </view>
  12. <view class="plv-chat-list-flower__view" wx:else>
  13. <image mode="aspectFill" class="plv-mp-chat-list-reward-cash"
  14. src="https://router.polyv.net/proxy/livestatic.videocc.net/assets/wimages/icon-redpaper.png" /> {{ item.content.unick }} 打赏了 {{ item.content.rewardContent }} 元
  15. </view>
  16. </view>
  17. <!-- 系统 -->
  18. <view wx:elif="{{ item.system}}" class="plv-mp-chat-list-msg-system">{{ item.content }}</view>
  19. <!-- 送花或点赞 -->
  20. <view wx:elif="{{ item.flowers || item.EVENT === 'LIKES' }}" class="plv-mp-chat-list-msg-flower">
  21. {{ item.nick }} 赠送了鲜花 <image mode="aspectFill" src="../../assets/images/chat-icon-flower.png" class="plv-mp-chat-list-icon__flower" />
  22. </view>
  23. <!-- 自定义消息 -->
  24. <view wx:elif="{{ item.isCustomMsg }}" class="plv-mp-chat-list-msg-custom">
  25. <text>{{ item.content }}</text>
  26. <image class="plv-mp-chat-list-msg-custom__image" wx:if="{{ item.image }}" src="{{ item.image }}" />
  27. </view>
  28. <!-- 自己 -->
  29. <view wx:elif="{{ item.currentUser }}" class="plv-mp-chat-list-msg-other">
  30. <image class="plv-mp-chat-list-user-avatar" src="{{ item.user.pic }}" />
  31. <view class="plv-mp-chat-list-user-info">
  32. <text class="plv-mp-chat-list-user-info__actor" wx:if="{{ item.actor || item.user.actor }}">{{ item.actor || item.user.actor }}</text>
  33. <text>{{ item.user.nick || item.user.userName }}</text>
  34. </view>
  35. <view class="plv-mp-chat-list-msg-content">
  36. <content-parser content="{{ item.content }}" />
  37. </view>
  38. </view>
  39. <!-- 他人 -->
  40. <view wx:else class="plv-mp-chat-list-msg-other {{ item.actor || item.user.actor ? 'plv-mp-chat-list-msg-other__actor' : '' }}">
  41. <image class="plv-mp-chat-list-user-avatar" src="{{ item.user.pic }}" />
  42. <view class="plv-mp-chat-list-user-info">
  43. <text class="plv-mp-chat-list-user-info__actor" wx:if="{{ item.actor || item.user.actor }}">{{ item.actor || item.user.actor }}</text>
  44. <text>{{ item.user.nick || item.user.userName }}</text>
  45. </view>
  46. <view class="plv-mp-chat-list-msg-content">
  47. <content-parser content="{{ item.content }}" />
  48. </view>
  49. </view>
  50. </block>
  51. </view>
  52. </view>
  53. </view>