search.wxml 1.53 KB
<!--pages/reserve/search.wxml-->
<nav>搜索</nav>
<view class="pages">
    <view class="searchAddrView">
        <view class="searchAddr flex-ll">
            <image class="icon" src="http://qn.colorcun.com/custom/lite-online/image/search26.png"></image>
            <input style="width: 100%;" placeholder="输入餐厅名或地名,快速订包间"
                   type="text" confirm-type="done"
                   focus
                   bindinput="getsuggest" value="{{backfill}}"/>
        </view>
    </view>
    <view class="res-view">
        <!--绑定回填事件-->
        <block wx:for="{{suggestion}}" wx:key="index"
               bindtap="backfill" id="{{index}}">
            <search-item item="{{item}}" keyword="{{keyword}}" bindclick="searchItemClick"></search-item>
            <view wx:if="{{index==1 && hasSellerMore}}" class="see-more" bindtap="gotoList"></view>
            <view wx:if="{{index==sellerSplit && sellerSplit>-1}}" class="see-split"></view>
        </block>
    </view>
</view>
<view class="history" wx:if="{{history.length>0 && suggestion.length<1}}">
    <view class="pages">
        <view class="flex-lr">
            <view class="history-title">最近搜索</view>
            <view class="history-empty" bindtap="historyEmpty"></view>
        </view>
        <view class="history-list">
            <block wx:for="{{history}}" wx:key="history.key">
                <search-item item="{{item}}" hasHistory bindclick="searchItemClick"></search-item>
            </block>
        </view>
    </view>
</view>
<fb></fb>