123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109 |
- <!--parents/pages/search/search.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='header {{content.length > 0 ? "header-active" : ""}}'>
- <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' confirm-type='search' bindconfirm='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 bindtap='returnBack' class='search-cancel'>取消</view>
- </view>
- </view>
- <view class='topic' wx:if='{{options.type ==3}}'>
- <image src='../../../assets/topic{{options.img_index}}.png' class='topic-img'></image>
- <view>{{options.theme_name}}阅读主题</view>
- </view>
- <view class='items' wx:if='{{options.type == 2}}'>
- <view class='item' bindtap='showItemCtl'>
- <text class='item-text'>{{items[itemIndex]}}</text>
- <image class='item-icon {{isShow ? "item-icon-active" : ""}}' src='../../../assets/arrow_blue.png'></image>
- </view>
- <view class='items-modal' wx:if='{{isShow}}' catchtouchmove='true'>
- <view class='items-modal-list'>
- <view class='items-modal-li' wx:for='{{items}}' wx:key='{{index}}' data-index='{{index}}' bindtap='selectItemCtl'>
- <view class='items-modal-text'>{{item}}</view>
- <image class='items-modal-icon' wx:if='{{itemIndex == index}}' src='../../../assets/true_blue.png'></image>
- </view>
- </view>
- </view>
- </view>
- <!-- 历史记录 -->
- <view class='history' wx:if='{{contentList.length>0&&isRecord}}'>
- <view class='history-items'>
- <view>最近搜索</view>
- <image class='history-img' src='../../../assets/delete.png' bindtap='deleteTips'></image>
- </view>
- <view>
- <view class='history-item' wx:for='{{contentList}}' wx:key='index'>{{item}}</view>
- </view>
- </view>
- <!-- 无书籍 -->
- <view class='nodata' wx:if='{{list.length==0&&isType}}'>
- <image src='../../../assets/nodata.png' class='nodata-img'></image>
- <view>暂时还没有这本书,可以申请哦~</view>
- <view class='nodata-btn' data-url='parents/pages/apply_bookform/apply_bookform' bindtap='navigateTo'>填写申请书单</view>
- </view>
- <view class='list-items' wx:if='{{options.type == 1&&list.length>0}}' style='margin:0 40rpx;'>
- <view class='list-items-title'>搜索结果</view>
- <view class='list-item' wx:for='{{list}}' wx:key='index' data-url='parents/pages/book_detail/book_detail' data-zindex='3' data-paras='{{({bookInfoId: item.bookInfoId})}}' bindtap='navigateTo'>
- <view class='list-item-img'>
- <image src='{{item.localImage?baseImgUrl+item.localImage:"../../../assets/banner1.png"}}' class='list-item-img-items'></image>
- </view>
- <view class='list-item-content'>
- <view class='list-item-content-title'>{{item.title}}</view>
- <view class='list-item-content-tips'>{{item.summary}}</view>
- <view class='list-item-content-label'>
- <view class='list-item-content-label-one' wx:if='{{item.themeName}}'>{{item.themeName}}</view>
- <view class='list-item-content-label-two' wx:if='{{item.grade}}'>推荐{{item.grade}}</view>
- </view>
- <view>
- <image src='../../../assets/fire.png' class='list-item-content-fire' wx:for="{{item.heat}}" wx:key='index'></image>
- </view>
- </view>
- </view>
- </view>
- <view class='list' wx:if='{{options.type == 2}}'>
- <view class='li' wx:for='{{list}}' wx:key='{{index}}'>
- <view class='book-container'>
- <view class='book-wrapper' data-url='parents/pages/book_detail/book_detail' data-zindex='3' data-paras='{{({isbn13: item.isbn13})}}' bindtap='navigateTo'>
- <view class='book-images'>
- <image class='book-image' 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>
-
- </view>
- </view>
- <!-- 好书推荐 -->
- <view class='list' wx:if='{{options.type==3}}'>
- <view class='li' wx:for='{{list}}' wx:key='{{index}}'>
- <view class='book-container'>
- <view class='book-wrapper' data-url='parents/pages/book_detail/book_detail' data-zindex='3' data-paras='{{({isbn13: item.isbn13})}}' bindtap='navigateTo'>
- <view class='book-images'>
- <image class='book-image' 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>
- </view>
- </view>
- <template is='nodata' data='{{...nodataArray}}' wx:if='{{list.length==0&&options.type!=1}}'></template>
- <template is='nodata' data='{{...nodataArray}}' wx:if='{{options.type!=1&&borrowingList.length==0&&reservelist.length==0&&wishList.length==0}}'></template>
- </view>
- </view>
|