1234567891011121314151617181920212223242526272829303132333435363738394041424344 |
- <view class="page">
- <!-- <view class="search-w">
- <view class="search-left" bindtap="showSelect">
- <text>{{ searchTypes[activeIndex].text }}</text>
- <icon class="icon" icon="scene_tit_arrow" size="12" />
- <view class="select-w" catchtap="hideSelect" wx:if="{{ selectShowStatus }}">
- <view class="mask"></view>
- <view class="select">
- <view class="options {{ activeIndex === index ? 'active' : ''}}" wx:for="{{searchTypes}}" wx:key="{{index}}" data-index="{{ index }}" bindtap="changeSearchType">{{ item.text }}</view>
- </view>
- </view>
- </view>
- <view class="search-right">
- <icon icon="home_search" size="15" />
- <input placeholder="请输入关键字" value="{{ keyword }}" confirm-type="search" bindconfirm="search" ></input>
- </view>
- </view> -->
- <view class="search-bar-w">
- <search-bar bindsearch="search" value="{{ keyword }}" bindinput="handleInput" />
- <view class="search-result-tips" wx:if="{{searchTips.length > 0}}">
- <view wx:for="{{searchTips}}" wx:key="{{index}}" data-item="{{item}}" bindtap="handleTipClick">{{ item }}</view>
- </view>
- </view>
- <view class="search-history" wx:if="{{!showResult}}">
- <view class="history-header">
- <text>历史搜索</text>
- <icon icon="search_clear" class="fr" bindtap="clearHistory"></icon>
- </view>
- <view class="history-list">
- <view class="history-item" wx:for="{{history}}" wx:key="index" data-keyword="{{ item }}" bindtap="searchHistory">{{ item }}</view>
- </view>
- </view>
- <view class="search-result" wx:else>
- <view class="search-tip">“{{ keyword }}”搜索结果({{ resultList.length }})</view>
- <view class="result-list">
- <view class="result-item" wx:for="{{resultList}}" wx:key="{{index}}" data-index="{{index}}" bindtap="toResultDetail">
- <view class="image" style="background-image: url({{item.img}})"></view>
- <view class="result-name">{{ item.name }}</view>
- </view>
- </view>
- </view>
- </view>
- <no-more-bar wx:if="{{ showResult }}" />
|