index.wxml 2.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788
  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="tab">
  6. <template is="zan-tab" data="{{ ...tab, componentId: 'tab' }}"></template>
  7. </view>
  8. <!-- E 选项卡 -->
  9. <!-- S 焦点图 -->
  10. <view class="focus">
  11. <swiper indicator-dots="true" autoplay="true" interval="3000" duration="1000" class="swiper">
  12. <block wx:for="{{ bannerList }}" wx:key="key">
  13. <navigator url="{{item.url}}">
  14. <swiper-item>
  15. <image src="{{item.image}}" width="100%" height="100%" />
  16. <text class="text">{{item.title}}</text>
  17. </swiper-item>
  18. </navigator>
  19. </block>
  20. </swiper>
  21. </view>
  22. <!-- E 焦点图 -->
  23. <!-- S 首页列表 -->
  24. <view class="archives-list">
  25. <view class="zan-panel">
  26. <block wx:for="{{ archivesList }}" wx:key="key">
  27. <navigator url="{{ item.model_id == 2 ? '../product/detail?id='+item.id : '../news/detail?id='+item.id }}">
  28. <view class="zan-card gallery-list" wx:if="{{item.images_list.length>1}}">
  29. <view class="zan-card__title">
  30. <view class="zan-card__detail-row">
  31. <view class="zan-card__left-col zan-ellipsis--l2">
  32. {{ item.title }}
  33. </view>
  34. </view>
  35. </view>
  36. <view class="zan-row zan-gallery">
  37. <view wx:for="{{ item.images_list }}" wx:for-item="image" wx:key="key">
  38. <view class="zan-col zan-col-8">
  39. <view class="zan-card__thumb">
  40. <view class="image" style="background-image:url('{{image}}')"></view>
  41. </view>
  42. </view>
  43. </view>
  44. </view>
  45. <view class="zan-card__detail">
  46. <view class="zan-card__detail-row zan-c-gray">
  47. <view class="zan-card__right-col"></view>
  48. <view class="zan-card__left-col author">
  49. {{ item.author }} {{ item.create_date }}
  50. </view>
  51. </view>
  52. </view>
  53. </view>
  54. <view wx:if="{{item.images_list.length<2}}" class="zan-card">
  55. <view class="zan-card__thumb">
  56. <view class="image" style="background-image:url('{{item.image}}')"></view>
  57. </view>
  58. <view class="zan-card__detail">
  59. <view class="zan-card__detail-row">
  60. <view class="zan-card__left-col zan-ellipsis--l2">
  61. {{ item.title }}
  62. </view>
  63. </view>
  64. <view class="zan-card__detail-row zan-c-gray">
  65. <view class="zan-card__right-col"></view>
  66. <view class="zan-card__left-col author">
  67. {{ item.author }} {{ item.create_date }}
  68. </view>
  69. </view>
  70. </view>
  71. </view>
  72. </navigator>
  73. </block>
  74. </view>
  75. </view>
  76. <!-- E 首页列表 -->
  77. <!-- S 加载更多 -->
  78. <template is="zan-loadmore" data="{{ loading: loading }}" />
  79. <template is="zan-loadmore" data="{{ nodata: nodata }}" />
  80. <template is="zan-loadmore" data="{{ nomore: nomore }}" />
  81. <!-- E 加载更多 -->
  82. </view>