borrow.wxml 3.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. <!--parents/pages/borrow/borrow.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 {{navIndex == 0 ? "pb" : ""}}' wx:else>
  7. <view class='nav' wx:if='{{isSuccess!=1}}'>
  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='success' wx:if='{{isSuccess==1}}'>
  16. <view class='success-logo'>
  17. <image src='../../../assets/success.png' class='success-logo-img'></image>
  18. <view>借阅成功</view>
  19. </view>
  20. <view>记得按时归还书籍哦,没看完可再次扫码续借</view>
  21. </view>
  22. <view class='list'>
  23. <block wx:if='{{navList[navIndex]["list"].length > 0}}' >
  24. <view class='li' wx:for='{{navList[navIndex]["list"]}}' wx:key='{{index}}'>
  25. <view class='book-container'>
  26. <view class='book-wrapper'>
  27. <view class='book-images'>
  28. <image class='book-image' wx:if='{{navIndex == 0}}' mode='aspectFill' src='{{item.img ? baseImgUrl + item.img : "../../../assets/default_headicon.png"}}'></image>
  29. <image class='book-image' wx:elif='{{navIndex == 1}}' mode='aspectFill' src='{{item.local_image ? baseImgUrl + item.local_image : "../../../assets/default_headicon.png"}}'></image>
  30. </view>
  31. <view class='book-content'>
  32. <view class='book-title'>{{item.title || ''}}</view>
  33. <view class='book-text'>作者:{{item.author || ''}}</view>
  34. <view class='book-context'>{{item.summary || ''}}</view>
  35. </view>
  36. </view>
  37. <view class='book-footer book-footer-right'>
  38. <view class='book-footer-item' data-index='{{index}}' bindtap='delBookCtl' wx:if='{{navIndex == 0}}'>
  39. <text class='book-button-yellow'>删除</text>
  40. </view>
  41. <view class='book-footer-item' wx:elif='{{navIndex == 1}}'>
  42. <text class='book-text-yellow'>已借阅{{item.days || 0}}天</text>
  43. </view>
  44. </view>
  45. </view>
  46. </view>
  47. </block>
  48. <template is='nodata' data='{{...navList[navIndex]["nodataArray"]}}' wx:else></template>
  49. </view>
  50. <view class='footer-box' wx:if='{{navIndex == 0&&isSuccess!=1}}'>
  51. <view class='footer-box-item' bindtap='scanCtl'>继续借阅</view>
  52. <view class='footer-box-item' bindtap='submitCtl'>确定借阅以上书籍</view>
  53. </view>
  54. </view>
  55. </view>