good_books.wxml 5.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576
  1. <!--president/pages/good_books/good_books.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 pb' wx:else>
  8. <view class='nav nav-two'>
  9. <view class='nav-item nav-item2' wx:for='{{navList}}' wx:key='index' data-index='{{index}}' bindtap='selectNavCtl'>
  10. <view class='nav-item-row {{navIndex == index ? "nav-item-row-active2" : ""}}'>
  11. <view class='nav-item-text {{navIndex == index ? "nav-item-text-active2" : ""}}'>{{item.text}}</view>
  12. </view>
  13. </view>
  14. </view>
  15. <view class='header {{navList[navIndex].title.length > 0 ? "header-active" : ""}}'>
  16. <view class='search-container'>
  17. <view class='search-wrapper'>
  18. <image class='search-icon' src='../../../assets/search.png'></image>
  19. <input class='search-input' type='text' value='{{navList[navIndex].title}}' placeholder='如:夏洛特的烦恼' placeholder-class='search-placeholder' bindinput='inputSearchCtl'></input>
  20. <image class='search-icon' wx:if='{{navList[navIndex].title.length > 0}}' src='../../../assets/error_gray.png' bindtap='clearSearchCtl'></image>
  21. </view>
  22. <view class='search-button {{navList[navIndex].title.length > 0 ? "search-button-active" : ""}}' bindtap='submitSearchCtl'>搜索</view>
  23. </view>
  24. </view>
  25. <view class='items'>
  26. <view class='item' bindtap='toggleItemCtl'>
  27. <text class='item-text'>{{navList[navIndex].items[navList[navIndex].itemIndex]}}</text>
  28. <image class='item-icon {{isShow ? "item-icon-active" : ""}}' src='../../../assets/arrow_blue.png'></image>
  29. </view>
  30. <view class='items-modal' wx:if='{{navList[navIndex].isShow}}' catchtouchmove='true'>
  31. <view class='items-modal-list'>
  32. <view class='items-modal-li' wx:for='{{navList[navIndex].items}}' wx:key='index' data-index='{{index}}' bindtap='selectItemCtl'>
  33. <view class='items-modal-text'>{{item}}</view>
  34. <image class='items-modal-icon' wx:if='{{navList[navIndex].itemIndex == index}}' src='../../../assets/true_blue.png'></image>
  35. </view>
  36. </view>
  37. </view>
  38. </view>
  39. <view class='list'>
  40. <view class='li' wx:for='{{navList[navIndex].list}}' wx:key='index' wx:if='{{navList[navIndex].list.length>0}}'>
  41. <view class='book-container'>
  42. <view class='book-wrapper'>
  43. <view class='book-images'>
  44. <image class='book-image' lazy-load='true' style="left:{{ key * 15 }}rpx; z-index:{{ key * 30 }}" mode='aspectFill' src='{{item.imagesList ? baseImgUrl + val + thumbnail : "../../../assets/default_headicon.png"}}' wx:if='{{navIndex == 0}}' wx:for="{{item.imagesList}}" wx:key='key' wx:for-item='val' wx:for-index='key' data-images='{{item.imagesList}}' data-baseurl='{{baseImgUrl}}' bindtap='viewImage'></image>
  45. <image class='book-image' lazy-load='true' mode='aspectFill' wx:if='{{navIndex==1}}' src='{{item.local_image ? baseImgUrl + item.local_image + thumbnail : "../../../assets/default_headicon.png"}}' data-images='{{([item.local_image])}}' data-baseurl='{{baseImgUrl}}' bindtap='viewImage'></image>
  46. </view>
  47. <view class='book-content'>
  48. <view class='book-title'>{{navIndex == 1 ? item.title : item.theme}}</view>
  49. <view class='book-text'>{{navIndex == 1 ? '归类:' + item.theme : '共计:' + item.total + '本'}}</view>
  50. <view class='book-text'>
  51. <text>热度:</text>
  52. <image class='book-icon-two' wx:for='{{3}}' wx:key='index' wx:for-item='val' wx:for-index='index' src="{{item.heat - 1 >= val ? '../../../assets/heart_red.png' : '../../../assets/heart2_gray.png' }}"></image>
  53. </view>
  54. </view>
  55. <view class='book-footer-two' wx:if='{{navIndex == 1}}'>
  56. <view class='book-footer-item' data-index='{{index}}' bindtap='getBooksCtl'>
  57. <text class='book-button-fill-blue'>调入</text>
  58. </view>
  59. </view>
  60. <view class='book-footer-two' wx:else>
  61. <view class='book-footer-item-two' data-url='president/pages/part_call_in/part_call_in' data-paras='{{({status: 1, theme: item.theme, childTheme: item.child_theme})}}' data-zindex='3' bindtap='navigateTo'>
  62. <text class='book-button-fill-blue'>全部调入</text>
  63. </view>
  64. <view class='book-footer-item-two' data-url='president/pages/part_call_in/part_call_in' data-paras='{{({status: 2, theme: item.theme, childTheme: item.child_theme})}}' data-zindex='3' bindtap='navigateTo'>
  65. <text class='book-button-blue'>部分调入</text>
  66. </view>
  67. </view>
  68. </view>
  69. </view>
  70. </view>
  71. <template is='nodata' data='{{...nodataArray}}' wx:if='{{navList[navIndex].list.length==0}}'></template>
  72. </view>
  73. </view>
  74. <template is='footer' data='{{...footerData}}'></template>
  75. </view>