index.wxml 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. <import src="/assets/libs/zanui/tab/index.wxml" />
  2. <import src="/assets/libs/zanui/loadmore/index.wxml" />
  3. <view class="container">
  4. <!-- S 焦点图 -->
  5. <view class="swiper">
  6. <swiper indicator-dots="true" interval="3000" duration="1000">
  7. <block wx:for="{{ bannerList }}" wx:key="key">
  8. <navigator url="../post/detail?id={{item.id}}">
  9. <swiper-item>
  10. <view class="swiper-item" style="background-image:url({{item.image}});"></view>
  11. <text class="text">{{item.title}}</text>
  12. </swiper-item>
  13. </navigator>
  14. </block>
  15. </swiper>
  16. </view>
  17. <!-- E 焦点图 -->
  18. <!-- S 首页列表 -->
  19. <view class="post-list">
  20. <block wx:for="{{ postList }}" wx:key="key">
  21. <navigator url="../post/detail?id={{item.id}}">
  22. <view class="zan-card">
  23. <view class="zan-card__thumb">
  24. <view class="image" style="background-image:url('{{item.image}}')"></view>
  25. </view>
  26. <view class="zan-card__detail">
  27. <view class="zan-card__detail-row">
  28. <view class="zan-card__left-col">
  29. {{ item.title }}
  30. </view>
  31. </view>
  32. <view class="zan-card__detail-row zan-c-gray">
  33. <view class="zan-card__right-col">
  34. {{ item.create_date }}
  35. </view>
  36. <view class="zan-card__left-col author">
  37. {{ item.summary }}
  38. </view>
  39. </view>
  40. </view>
  41. </view>
  42. </navigator>
  43. </block>
  44. </view>
  45. <!-- E 首页列表 -->
  46. <!-- S 加载更多 -->
  47. <template is="zan-loadmore" data="{{ loading: loading }}" />
  48. <template is="zan-loadmore" data="{{ nodata: nodata }}" />
  49. <template is="zan-loadmore" data="{{ nomore: nomore }}" />
  50. <!-- E 加载更多 -->
  51. </view>