reservations.wxml 3.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. <!--parents/pages/reservations/reservations.wxml-->
  2. <import src="../../../templates/nodata/nodata.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. <view class='nav'>
  8. <view class='nav-item' wx:for='{{navList}}' wx:key='{{index}}' data-index='{{index}}' bindtap='selectNavCtl'>
  9. <view class='nav-item-row {{navIndex == index ? "nav-item-row-active" : ""}}'>
  10. <view class='nav-item-text {{navIndex == index ? "nav-item-text-active" : ""}}'>{{item.text}}</view>
  11. <view class='nav-item-button {{navIndex == index ? "nav-item-button-active" : ""}}' wx:if='{{index == 1}}'>{{navList[index]["list"].length}}本</view>
  12. </view>
  13. </view>
  14. </view>
  15. <view class='list'>
  16. <block wx:if='{{navIndex == 0}}'>
  17. <view class='li'>
  18. <view class='li-title'>请输入您需要预约的书籍名字</view>
  19. <view class='search-container'>
  20. <view class='search-wrapper'>
  21. <image class='search-icon' src='../../../assets/search.png'></image>
  22. <input class='search-input' type='text' value='{{content}}' placeholder='如:夏洛特的烦恼' placeholder-class='search-placeholder' bindinput='inputSearchCtl'></input>
  23. <image class='search-icon' wx:if='{{content.length > 0}}' src='../../../assets/error_gray.png' bindtap='clearSearchCtl'></image>
  24. </view>
  25. <view class='search-button {{content.length > 0 ? "search-button-active" : ""}}' bindtap='submitSearchCtl'>搜索</view>
  26. </view>
  27. </view>
  28. <view class='li-label'>大家都在看</view>
  29. </block>
  30. <block wx:if='{{navList[navIndex]["list"].length > 0}}'>
  31. <view class='li' wx:for='{{navList[navIndex]["list"]}}' wx:key='{{index}}'>
  32. <view class='book-container'>
  33. <view class='book-wrapper'>
  34. <view class='book-images'>
  35. <image class='book-image' mode='aspectFill' src='{{item.local_image ? baseImgUrl + item.local_image : "../../../assets/default_headicon.png"}}'></image>
  36. <!-- <view class='book-tip'>发动机</view> -->
  37. </view>
  38. <view class='book-content'>
  39. <view class='book-title'>{{item.title}}</view>
  40. <view class='book-text'>作者:{{item.author}}</view>
  41. <view class='book-context'>{{item.summary}}</view>
  42. </view>
  43. </view>
  44. <view class='book-footer book-footer-right'>
  45. <view class='book-footer-item' data-index='{{index}}' bindtap='reservationsCtl' wx:if='{{navIndex == 0}}'>
  46. <image class='book-icon' src='../../../assets/time_blue.png'></image>
  47. <text class='book-text-blue book-text-large'>我要预约</text>
  48. </view>
  49. <view class='book-footer-item' wx:elif='{{navIndex == 1}}'>
  50. <text class='book-text-yellow'>{{item.days}}天后将释放锁定</text>
  51. </view>
  52. </view>
  53. </view>
  54. </view>
  55. </block>
  56. <template is='nodata' data='{{...navList[navIndex]["nodataArray"]}}' wx:else></template>
  57. </view>
  58. </view>
  59. </view>