itemCard.wxml 1.6 KB

1234567891011121314151617181920212223242526272829303132
  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">{{item.name}}</view>
  14. <view class="time primary-text-color">{{item.publish_time}}</view>
  15. </view>
  16. <view class="sub-title">{{item.brief}}</view>
  17. <imagePicker wx:if="{{item.poster.length}}" value="{{item.poster}}" max="1" image-width="698" image-height="330"
  18. readonly />
  19. <imagePicker wx:if="{{!item.poster.length && item.photo.length}}" value="{{item.photo}}" max="1"
  20. image-width="{{item.photo.length === 1 ? 698 : item.photo.length <= 4 ? 330 : 220}}"
  21. image-height="{{item.photo.length === 1 ? 330 : item.photo.length <= 4 ? 330 : 220}}" readonly />
  22. <view class="bottom-line">
  23. <view class="tags primary-text-color">
  24. <text class="tag" wx:for="{{item.tag}}" wx:for-item="tag" wx:key="*this" data-tag="{{tag}}"
  25. catchtap="filterTag">{{tag}}</text>
  26. </view>
  27. <view class="to-detail">
  28. <text class="primary-text-color" style="font-size: 20rpx;">查看详情</text>
  29. <image class="arrow" src="/images/hollow_arrow.png" mode="aspectFill"></image>
  30. </view>
  31. </view>
  32. </view>