main.wxml 3.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. <!--parents//pages/main/main.wxml-->
  2. <import src="../../../templates/nodata/nodata.wxml" />
  3. <import src="../../../templates/footer/footer.wxml" />
  4. <import src="../../../templates/loading/loading.wxml" />
  5. <view class='container'>
  6. <template is='loading' wx:if='{{!isLoaded}}'></template>
  7. <view class='wrapper' wx:else>
  8. <view class='list' style='padding-bottom:{{isIphoneX?"166":""}}rpx'>
  9. <view class='li-header'>
  10. <view class='li-header-search' data-url='parents/pages/search/search' data-paras='{{({type: 1})}}' data-zindex='3' bindtap='navigateTo'>
  11. <image class='li-header-search-icon' src='../../../assets/search.png'></image>
  12. <text class='li-header-search-text'>搜索书本</text>
  13. </view>
  14. <view class='li-carousel'>
  15. <swiper class="li-carousel-img" indicator-dots="{{imgList.length>1?1:0}}" indicator-color="#f4f4f4" indicator-active-color="#4eb8b8" autoplay="{{imgList.length>1?1:0}}" interval='2000' circular='true'>
  16. <block wx:for="{{imgList}}" wx:key="key">
  17. <swiper-item bindtap='chomeCarouselClick' data-url='{{item.url}}'>
  18. <image class="li-carousel-img" src='{{item?baseImgUrl+item:""}}' mode='aspectFill' ></image>
  19. </swiper-item>
  20. </block>
  21. </swiper>
  22. </view>
  23. <view class='li-items'>
  24. <view class='li-item' wx:for='{{routers}}' wx:key='index' data-index='{{index}}' bindtap='selectRouteCtl'>
  25. <image class='li-item-icon' src='{{item.icon}}'></image>
  26. <view class='li-item-text'>{{item.text}}</view>
  27. </view>
  28. </view>
  29. </view>
  30. <view class='list-items' wx:if='{{list.length>0}}'>
  31. <view class='list-items-title'>本次推荐</view>
  32. <view class='list-item' wx:for='{{list}}' wx:key='index' data-url='parents/pages/book_detail/book_detail' data-zindex='3' data-paras='{{({bookInfoId: item.bookInfoId})}}' bindtap='navigateTo'>
  33. <view class='list-item-img'>
  34. <image src='{{item.localImage?baseImgUrl+item.localImage:"../../../assets/banner1.png"}}' class='list-item-img-items'></image>
  35. </view>
  36. <view class='list-item-content'>
  37. <view class='list-item-content-title'>{{item.title}}</view>
  38. <view class='list-item-content-tips'>{{item.summary}}</view>
  39. <view class='list-item-content-label'>
  40. <view class='list-item-content-label-one' wx:if='{{item.themeName}}'>{{item.themeName}}</view>
  41. <view class='list-item-content-label-two' wx:if='{{item.grade}}'>推荐{{item.grade}}</view>
  42. </view>
  43. <view>
  44. <image src='../../../assets/fire.png' class='list-item-content-fire' wx:for="{{item.heat}}" wx:key='index'></image>
  45. </view>
  46. </view>
  47. </view>
  48. </view>
  49. <!-- <template is='nodata' data='{{...nodataArray}}' wx:if='{{list.length==0}}'></template> -->
  50. </view>
  51. </view>
  52. <template is='footer' data='{{...footerData}}'></template>
  53. </view>