1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859 |
- <!--parents/pages/reservations/reservations.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' wx:else>
- <view class='nav'>
- <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='list'>
- <block wx:if='{{navIndex == 0}}'>
- <view class='li'>
- <view class='li-title'>请输入您需要预约的书籍名字</view>
- <view class='search-container'>
- <view class='search-wrapper'>
- <image class='search-icon' src='../../../assets/search.png'></image>
- <input class='search-input' type='text' value='{{content}}' placeholder='如:夏洛特的烦恼' placeholder-class='search-placeholder' bindinput='inputSearchCtl'></input>
- <image class='search-icon' wx:if='{{content.length > 0}}' src='../../../assets/error_gray.png' bindtap='clearSearchCtl'></image>
- </view>
- <view class='search-button {{content.length > 0 ? "search-button-active" : ""}}' bindtap='submitSearchCtl'>搜索</view>
- </view>
- </view>
- <view class='li-label'>大家都在看</view>
- </block>
- <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' mode='aspectFill' src='{{item.local_image ? baseImgUrl + item.local_image : "../../../assets/default_headicon.png"}}'></image>
- <!-- <view class='book-tip'>发动机</view> -->
- </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='reservationsCtl' wx:if='{{navIndex == 0}}'>
- <image class='book-icon' src='../../../assets/time_blue.png'></image>
- <text class='book-text-blue book-text-large'>我要预约</text>
- </view>
- <view class='book-footer-item' wx:elif='{{navIndex == 1}}'>
- <text class='book-text-yellow'>{{item.days}}天后将释放锁定</text>
- </view>
- </view>
- </view>
- </view>
- </block>
- <template is='nodata' data='{{...navList[navIndex]["nodataArray"]}}' wx:else></template>
- </view>
- </view>
- </view>
|