home.wxml 4.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980
  1. <!--parents/pages/home/home.wxml-->
  2. <import src="../../../templates/footer/footer.wxml" />
  3. <import src="../../../templates/loading/loading.wxml" />
  4. <view class='container'>
  5. <template is='loading' wx:if='{{!isLoaded}}'></template>
  6. <view class='wrapper' wx:else>
  7. <image class='bg' mode='aspectFill' src='../../../assets/banner2.png'></image>
  8. <view class='list'>
  9. <view class='li-header'>
  10. <view class='li-header-address' data-url='parents/pages/library/library' data-zindex='3' bindtap='redirectTo'>
  11. <image class='li-header-address-icon' src='../../../assets/position.png'></image>
  12. </view>
  13. <view class='li-header-search' data-url='parents/pages/search/search' data-paras='{{({type: 1})}}' data-zindex='3' bindtap='navigateTo'>
  14. <image class='li-header-search-icon' src='../../../assets/search.png'></image>
  15. <text class='li-header-search-text'>搜索书本</text>
  16. </view>
  17. <view class='li-header-scan' bindtap='scanCtl'>
  18. <image class='li-header-scan-icon' src='../../../assets/scan.png'></image>
  19. </view>
  20. </view>
  21. <view class='li'>
  22. <view class='li-items'>
  23. <view class='li-item' wx:for='{{routers}}' wx:key='index' data-index='index' bindtap='selectRouteCtl'>
  24. <image class='li-item-icon' src='{{item.icon}}'></image>
  25. <view class='li-item-text'>{{item.text}}</view>
  26. </view>
  27. </view>
  28. </view>
  29. <view class='li'>
  30. <view class='li-label'>大家都在看</view>
  31. <view class='li-scroll'>
  32. <scroll-view scroll-x>
  33. <view class='li-scroll-items'>
  34. <view class='li-scroll-item' wx:for='{{topList}}' wx:key='index' data-url='parents/pages/book_detail/book_detail' data-paras='{{({isbn13: item.isbn13})}}' data-zindex='3' bindtap='navigateTo'>
  35. <image class='li-scroll-item-image' mode='aspectFill' src='{{item.local_image ? baseImgUrl + item.local_image : "../../../assets/default_headicon.png"}}'></image>
  36. <view class='li-scroll-item-text'>{{item.title}}</view>
  37. <view class='li-scroll-item-text-red'>
  38. <image class='li-scroll-item-icon' src='../../../assets/fire.png'></image>
  39. <text>{{item.cishu}}</text>
  40. </view>
  41. </view>
  42. </view>
  43. </scroll-view>
  44. </view>
  45. </view>
  46. <view class='li' wx:if='{{list.length > 0}}'>
  47. <view class='li-label'>新上架好书</view>
  48. <view class='book-container' data-url='parents/pages/book_detail/book_detail' data-paras='{{({isbn13: list[0].isbn13})}}' data-zindex='3' bindtap='navigateTo'>
  49. <view class='book-wrapper'>
  50. <view class='book-images'>
  51. <image class='book-image' mode='aspectFill' src='{{list[0]["local_image"] ? baseImgUrl + list[0]["local_image"] : "../../../assets/default_headicon.png"}}'></image>
  52. </view>
  53. <view class='book-content'>
  54. <view class='book-title'>{{list[0]["title"]}}</view>
  55. <view class='book-context'>{{list[0]["summary"]}}</view>
  56. </view>
  57. </view>
  58. </view>
  59. <view class='li-scroll-small'>
  60. <scroll-view scroll-x>
  61. <view class='li-scroll-items-small'>
  62. <view class='li-scroll-item-small' wx:if='{{index != 0}}' wx:for='{{list}}' wx:key='index' data-url='parents/pages/book_detail/book_detail' data-paras='{{({isbn13: item.isbn13})}}' data-zindex='3' bindtap='navigateTo'>
  63. <image class='li-scroll-item-image-small' mode='aspectFill' src='{{item.local_image ? baseImgUrl + item.local_image : "../../../assets/default_headicon.png"}}'></image>
  64. <view class='li-scroll-item-text-small'>{{item.title}}</view>
  65. </view>
  66. </view>
  67. </scroll-view>
  68. </view>
  69. </view>
  70. <view class='li-footer'>
  71. <view class='li-footer-view' data-url='parents/pages/search/search' data-paras='{{({type: 2})}}' data-zindex='3' bindtap='navigateTo'>
  72. <image class='li-footer-icon' src='../../../assets/heart.png'></image>
  73. <text class='li-footer-text'>还有10000+本藏书等着你的发现>></text>
  74. </view>
  75. </view>
  76. </view>
  77. </view>
  78. <template is='footer' data='{{...footerData}}'></template>
  79. </view>