index.wxml 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637
  1. <navigationBar></navigationBar>
  2. <view class="recommend">
  3. <!-- 头部及轮播图 -->
  4. <view class="header">
  5. <view class="headerBg"></view>
  6. <swiper class="swiper" autoplay circular indicator-dots indicator-active-color="#fff" indicator-color='#ecececa1'>
  7. <block wx:for="{{background}}" wx:key="*this">
  8. <swiper-item>
  9. <view class="swiper-item {{item}}"></view>
  10. </swiper-item>
  11. </block>
  12. </swiper>
  13. </view>
  14. <!-- 滚动定位 -->
  15. <view class="scrollBox {{isFixed?'isFixed':''}}" style="top:{{navBarHeight}}px;">
  16. <!-- 一级分类区域 -->
  17. <scroll-view class="firstClassify" scroll-x="true">
  18. <view class="firstBox" wx:for="{{10}}" wx:key="index">
  19. <image class="icon" src="/static/header.png" mode="" />
  20. <view class="name">书香美文</view>
  21. </view>
  22. </scroll-view>
  23. <!-- 展示类型选择 -->
  24. <view class="selectType {{isFixed?'isFixed2':''}}" bindtap="selectType">
  25. <view class="type {{currentType=='1'?'currentType':''}}" data-type='1'>优秀作品展播</view>
  26. <view class="type {{currentType=='2'?'currentType':''}}" data-type='2'>官方推荐</view>
  27. <view class="type {{currentType=='3'?'currentType':''}}" data-type='3'>官方活动</view>
  28. <view class="search">
  29. <image src="/static/search.png" class="searchImg" />
  30. </view>
  31. </view>
  32. </view>
  33. <!-- 当一级分类固定定位时占位用的元素 -->
  34. <view class="{{isFixed?'brace':''}}" />
  35. <!-- 优秀作品展播及官方推荐列表组件 -->
  36. <worksList id="worksList" worksList="{{list}}" />
  37. </view>