|
|
<view class="searchContainer">
|
|
|
<template name="brand-list-item">
|
|
|
<view class='row' bindtap="brandItemTapped" data-brand-item="{{brand}}">
|
|
|
<view class="content">
|
|
|
<image class="brand-icon" src="{{item.logo}}" mode="aspectFill"></image>
|
|
|
<view class='rowContent'>
|
|
|
<text class='title'>{{item.name}}</text>
|
|
|
<text class='location'>展位号:A578</text>
|
|
|
</view>
|
|
|
</view>
|
|
|
<view class='spaceLine'/>
|
|
|
</view>
|
|
|
</template>
|
|
|
|
|
|
|
|
|
<view class="searchContainer">
|
|
|
<view class="search">
|
|
|
<image class="serachIcon" src="../index/images/home_search@2x.png"></image>
|
|
|
<image class="serachIcon" src="../../static/images/search@3x.png"></image>
|
|
|
<input class="serachInput" placeholder="搜索结果" bindinput="inputChanged" bindfocus="focusChanged" bindconfirm="inputConfirmed" placeholder-class="placeholder" auto-focus/>
|
|
|
</view>
|
|
|
<text class="cancelButton" bindtap="cancelSearch">取消</text>
|
...
|
...
|
@@ -9,54 +23,10 @@ |
|
|
|
|
|
<view class="searchResult">
|
|
|
<block wx:if="{{showResult}}">
|
|
|
<view class='NoResult' wx:if="{{!hasResult}}">无结果</view>
|
|
|
<block wx:for="{{result}}" wx:key="{{index}}" wx:for-item="item">
|
|
|
<view id="{{index == '0-9' ? 'last' : index}}" class='search_sessionTitle'>
|
|
|
<text class='search_sessionText'>{{index == '0-9' ? '0' : index}}</text>
|
|
|
</view>
|
|
|
<block wx:for="{{item}}" wx:key="{{unique}}" wx:for-item="item">
|
|
|
<view class='search_row' wx:if="{{item.type == 2}}" bindtap="search_brandItemTapped" data-brand-item="{{item}}">
|
|
|
<view class='search_rowContent'>
|
|
|
<text class='search_title'>{{item.brand_name}}</text>
|
|
|
<view class='search_new' wx:if="{{item.is_show_new == 'Y'}}">
|
|
|
<text class='search_text'>NEW</text>
|
|
|
</view>
|
|
|
<view class='search_hot' wx:if="{{item.is_hot == 'Y'}}">
|
|
|
<text class='search_text'>HOT</text>
|
|
|
</view>
|
|
|
</view>
|
|
|
<view class='search_spaceLine'/>
|
|
|
</view>
|
|
|
</block>
|
|
|
<view class='noResult' wx:if="{{!hasResult}}">无结果</view>
|
|
|
<block wx:for="{{result}}" wx:key="{{index}}" wx:for-item="brand">
|
|
|
<template is="brand-list-item" data="{{item:brand}}"/>
|
|
|
</block>
|
|
|
</block>
|
|
|
<block wx:else>
|
|
|
|
|
|
<view class="searchHistoryContainer" hidden="{{(searchHistory.length > 0) ? false : true}}">
|
|
|
<text class="hotKeyword">最近搜索</text>
|
|
|
<image class='deleteButton' bindtap='clearSearchHistory' src='../search/images/rubbish-ic@2x.png'></image>
|
|
|
<view class="hotKeywordItemContainer">
|
|
|
<block wx:for="{{searchHistory}}" wx:key="{{index}}">
|
|
|
<view class="hotKeywordItem" bindtap="historyKeywordItemTapped" data-item="{{item}}">
|
|
|
<text class="hotKeywordTitle">{{item.brand_name}}</text>
|
|
|
</view>
|
|
|
</block>
|
|
|
</view>
|
|
|
</view>
|
|
|
|
|
|
<view class='hotHistorySeparator' hidden="{{(searchHistory.length > 0) ? false : true}}"></view>
|
|
|
|
|
|
<view class="hotKeywordContainer">
|
|
|
<text class="hotKeyword">热门搜索</text>
|
|
|
<view class="hotKeywordItemContainer">
|
|
|
<block wx:for="{{hotKeyword['data']}}" wx:key="{{index}}">
|
|
|
<view class="hotKeywordItem" bindtap="hotKeywordItemTapped" data-item="{{item}}">
|
|
|
<text class="hotKeywordTitle">{{item.brandName}}</text>
|
|
|
</view>
|
|
|
</block>
|
|
|
</view>
|
|
|
</view>
|
|
|
|
|
|
|
|
|
</block>
|
|
|
</view> |
|
|
\ No newline at end of file |
...
|
...
|
|