book_classification.wxml 4.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  1. <import src="../../../templates/nodata/nodata.wxml" />
  2. <import src="../../../templates/loading/loading.wxml" />
  3. <view class='container'>
  4. <template is='loading' wx:if='{{!isLoaded}}'></template>
  5. <view class='wrapper' wx:else>
  6. <view class='li'>
  7. <block wx:if='{{isClass}}'>
  8. <view class='li-book'>
  9. <view class='li-book-title'>主题</view>
  10. <view class='li-book-items'>
  11. <view class='li-book-item' wx:for='{{themeList}}' wx:key='index' data-type='{{1}}' data-code='{{item.code}}' data-theme='{{item.name}}' wx:if='{{index!=0}}' bindtap='selectTheme'>{{item.name}}:{{item.total?item.total:0}}本</view>
  12. </view>
  13. </view>
  14. <view class='li-book'>
  15. <view class='li-book-title'>年段</view>
  16. <view class='li-book-items'>
  17. <view class='li-book-item' wx:for='{{gradeList}}' data-type='{{0}}' wx:if='{{index!=0}}' data-theme='{{item.grade}}' wx:key='index' bindtap='selectTheme'>{{item.grade}}:{{item.total?item.total:0}}本</view>
  18. </view>
  19. </view>
  20. </block>
  21. <block wx:if='{{!isClass}}'>
  22. <view class='li-book'>
  23. <view class='li-book-title'>{{theme}}</view>
  24. <scroll-view scroll-x="true" style='width:100%;'>
  25. <view class='li-theme'>
  26. <view wx:if='{{!isTheme}}' wx:for='{{themeList}}' wx:key='index' data-index='{{index}}' data-code='{{item.code}}' class='li-theme-item {{themeIdx==index?"li-theme-active":""}}' bindtap='selectOne'>{{item.name}}</view>
  27. <view wx:if='{{isTheme}}' wx:for='{{gradeList}}' wx:key='index' data-theme='{{item.gradeCode}}' data-index='{{index}}' class='li-theme-item {{themeIdx==index?"li-theme-active":""}}' bindtap='selectTwo'>{{item.grade}}</view>
  28. </view>
  29. </scroll-view>
  30. <view class='list-items'>
  31. <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'>
  32. <view class='list-item-img'>
  33. <image src='{{item.localImage?baseImgUrl+item.localImage:"../../../assets/banner1.png"}}' class='list-item-img-items'></image>
  34. <view class="list-item-booksize" wx:if='{{item.bookSize}}'>共{{item.bookSize}}本</view>
  35. </view>
  36. <view class='list-item-content'>
  37. <view>{{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 class="list-item-infoList" wx:if='{{item.infoList.length>0}}'>
  47. <view class="list-item-infoLists"wx:for='{{item.infoList}}' wx:key='key' wx:for-item='val' wx:for-key='{{key}}'>{{val.childName}}正在借阅{{val.borrowNum}}本,{{val.borrowDay}}天</view>
  48. </view>
  49. </view>
  50. </view>
  51. </view>
  52. </view>
  53. </block>
  54. <template is='nodata' data='{{...nodataArray}}' wx:if='{{themeList.length==0&&gradeList.length==0}}'></template>
  55. <view class='footer-box'>
  56. <block>
  57. <view class='li-circles'>
  58. <text class='li-text-gray'>在馆书籍: {{booksSize?booksSize:0}}本</text>
  59. </view>
  60. <view class='footer-box-btn' data-url='president/pages/book_entry/book_entry' bindtap='navigateTo'>+图书录入</view>
  61. </block>
  62. </view>
  63. </view>
  64. </view>
  65. </view>