itemCard.wxml 1.7 KB

123456789101112131415161718192021222324252627282930313233343536
  1. <!-- 为首页消息通知的组件,数据在mainData.js -->
  2. <view wx:if="{{show}}" class="item-card" bindtap="getMessageInfo">
  3. <view class="profile">
  4. <view class="avatar-name" catchtap="getPublisherInfo">
  5. <image class="publisher-avatar" src="{{item.publisher.avatar}}" mode="aspectFill"></image>
  6. <view class="publisher-name">{{item.publisher.name}}</view>
  7. </view>
  8. <view class="message-attribute primary-background-color white-text-color" catchtap="filterMsgType">
  9. {{item.type[0]}}
  10. </view>
  11. </view>
  12. <view class="title-time">
  13. <view class="title">
  14. <rich-text nodes="{{item.name}}"></rich-text>
  15. </view>
  16. <view class="time primary-text-color">{{item.publish_time}}</view>
  17. </view>
  18. <view class="sub-title">
  19. <rich-text nodes="{{item.brief}}"></rich-text>
  20. </view>
  21. <imagePicker wx:if="{{item.poster.length}}" value="{{item.poster}}" max="1" image-width="698" image-height="330"
  22. readonly />
  23. <imagePicker wx:if="{{!item.poster.length && item.photo.length}}" value="{{item.photo}}" max="1"
  24. image-width="{{item.photo.length === 1 ? 698 : item.photo.length <= 4 ? 330 : 220}}"
  25. image-height="{{item.photo.length === 1 ? 330 : item.photo.length <= 4 ? 330 : 220}}" readonly />
  26. <view class="bottom-line">
  27. <view class="tags primary-text-color">
  28. <text class="tag" wx:for="{{item.tag}}" wx:for-item="tag" wx:key="*this" data-tag="{{tag}}"
  29. catchtap="filterTag">{{tag}}</text>
  30. </view>
  31. <view class="to-detail">
  32. <text class="primary-text-color" style="font-size: 20rpx;">查看详情</text>
  33. <image class="arrow" src="/images/hollow_arrow.png" mode="aspectFill"></image>
  34. </view>
  35. </view>
  36. </view>