postCell.wxml 1.6 KB

123456789101112131415161718192021222324252627282930
  1. <!--components/newCell/newCell.wxml-->
  2. <!-- type = 1 文章 type = 2 视频 type = 2 帖子 -->
  3. <view class="post-cell" bind:tap="handleCellAction">
  4. <user-card author-info="{{data.authorInfo}}" is-author="{{data.isAuthor}}" time="{{data.createTimeText}}"
  5. is-show-more="{{true}}" is-show-like="{{false}}" bind:del="tapDeleteAction" catch:action="handleCellAction">
  6. </user-card>
  7. <text class="content">{{ data.content }}</text>
  8. <block wx:if="{{ data.type == 3 && data.imgsUrl.length}}">
  9. <view wx:if="{{ data.imgsUrl.length == 1}}" class="imgs-wrap">
  10. <image class="img-one" lazy-load="{{true}}" wx:for="{{ data.imgsUrl }}" wx:key="index" mode="aspectFill"
  11. src="{{ item }}">
  12. </image>
  13. </view>
  14. <view wx:elif="{{data.imgsUrl.length == 4}}" class="imgs-wrap">
  15. <image class="img-four" lazy-load="{{true}}" wx:for="{{ data.imgsUrl }}" wx:key="index" mode="aspectFill"
  16. src="{{ item }}">
  17. </image>
  18. </view>
  19. <view wx:else class="imgs-wrap">
  20. <image class="img" lazy-load="{{true}}" wx:for="{{ data.imgsUrl }}" wx:key="index" mode="aspectFill"
  21. src="{{ item }}"></image>
  22. </view>
  23. </block>
  24. <view wx:if="{{ data.type == 2 }}" class="video-wrap">
  25. <image class="video-img" lazy-load="{{true}}" mode="aspectFill"
  26. src="{{ data.videoCoverImgUrl || data.coverImgUrl }}"></image>
  27. <image class="video-icon" src="../../images/play.png"></image>
  28. </view>
  29. <tags-card tag-list="{{data.tagList}}"></tags-card>
  30. </view>