12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455 |
- <!--parents/pages/borrow/borrow.wxml-->
- <import src="../../../templates/nodata/nodata.wxml" />
- <import src="../../../templates/loading/loading.wxml" />
- <view class='container'>
- <template is='loading' wx:if='{{!isLoaded}}'></template>
- <view class='wrapper {{navIndex == 0 ? "pb" : ""}}' wx:else>
- <view class='nav' wx:if='{{isSuccess!=1}}'>
- <view class='nav-item' wx:for='{{navList}}' wx:key='{{index}}' data-index='{{index}}' bindtap='selectNavCtl'>
- <view class='nav-item-row {{navIndex == index ? "nav-item-row-active" : ""}}'>
- <view class='nav-item-text {{navIndex == index ? "nav-item-text-active" : ""}}'>{{item.text}}</view>
- <view class='nav-item-button {{navIndex == index ? "nav-item-button-active" : ""}}' wx:if='{{index == 1}}'>{{navList[index]["list"].length}}本</view>
- </view>
- </view>
- </view>
- <view class='success' wx:if='{{isSuccess==1}}'>
- <view class='success-logo'>
- <image src='../../../assets/success.png' class='success-logo-img'></image>
- <view>借阅成功</view>
- </view>
- <view>记得按时归还书籍哦,没看完可再次扫码续借</view>
- </view>
- <view class='list'>
- <block wx:if='{{navList[navIndex]["list"].length > 0}}' >
- <view class='li' wx:for='{{navList[navIndex]["list"]}}' wx:key='{{index}}'>
- <view class='book-container'>
- <view class='book-wrapper'>
- <view class='book-images'>
- <image class='book-image' wx:if='{{navIndex == 0}}' mode='aspectFill' src='{{item.img ? baseImgUrl + item.img : "../../../assets/default_headicon.png"}}'></image>
- <image class='book-image' wx:elif='{{navIndex == 1}}' mode='aspectFill' src='{{item.local_image ? baseImgUrl + item.local_image : "../../../assets/default_headicon.png"}}'></image>
- </view>
- <view class='book-content'>
- <view class='book-title'>{{item.title || ''}}</view>
- <view class='book-text'>作者:{{item.author || ''}}</view>
- <view class='book-context'>{{item.summary || ''}}</view>
- </view>
- </view>
- <view class='book-footer book-footer-right'>
- <view class='book-footer-item' data-index='{{index}}' bindtap='delBookCtl' wx:if='{{navIndex == 0}}'>
- <text class='book-button-yellow'>删除</text>
- </view>
- <view class='book-footer-item' wx:elif='{{navIndex == 1}}'>
- <text class='book-text-yellow'>已借阅{{item.days || 0}}天</text>
- </view>
- </view>
- </view>
- </view>
- </block>
- <template is='nodata' data='{{...navList[navIndex]["nodataArray"]}}' wx:else></template>
- </view>
- <view class='footer-box' wx:if='{{navIndex == 0&&isSuccess!=1}}'>
- <view class='footer-box-item' bindtap='scanCtl'>继续借阅</view>
- <view class='footer-box-item' bindtap='submitCtl'>确定借阅以上书籍</view>
- </view>
- </view>
- </view>
|