60 lines
2.8 KiB
Plaintext
60 lines
2.8 KiB
Plaintext
<!-- packageI/searchPage/searchPage.wxml -->
|
|
<view id="searchPage">
|
|
<view class="head">
|
|
<view class="inpbox">
|
|
<i class="iconfont icon-sousuo1"></i>
|
|
<input type="text" placeholder="{{searchHistory[0].name?searchHistory[0].name:'请输入搜索内容'}}" value="{{keyWord}}" bindconfirm="goSearch" bindinput="bindinp" />
|
|
</view>
|
|
<text catchtap="goSearch">{{keyWord.length > 0?'搜索':'取消'}}</text>
|
|
</view>
|
|
<view class="contenBox">
|
|
<!-- 最近搜索 -->
|
|
<view class="recent" wx:if="{{searchHistory.length > 0}}">
|
|
<view class="recent_top">
|
|
<text>最近搜索</text>
|
|
<icon class="iconfont icon-ht_operation_delete" catchtap="deleHistory"></icon>
|
|
</view>
|
|
<view class="recent_conten">
|
|
<block wx:for="{{searchHistory}}" wx:key="index">
|
|
<view class="recent_lis" catchtap="tapKeyWord" data-name="{{item.name}}">{{item.name}}</view>
|
|
</block>
|
|
</view>
|
|
</view>
|
|
<!-- 搜索发现 -->
|
|
<view class="discover" wx:if="{{discoverInfo}}">
|
|
<view class="recent_top">
|
|
<text>搜索发现</text>
|
|
</view>
|
|
<view class="discover_conten">
|
|
<block wx:for="{{discoverInfo}}" wx:key="index">
|
|
<view class="discover_lis" style="color:rgb({{ item.color }});background-color: rgba({{item.color}},0.07);" catchtap="tapKeyWord" data-name="{{item.title}}">
|
|
{{item.title}}
|
|
<view class="hot_logo" wx:if="{{item.img_url}}" style="background-image:url('{{ item.img_url }}');"></view>
|
|
</view>
|
|
</block>
|
|
</view>
|
|
<view class="discover_lis" catchtap="discoverMore" wx:if="{{discoverPage < discoverLastPage}}">
|
|
<view class="hot_logo_more">查看更多
|
|
<icon class="iconfont icon-member-bottom"></icon>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
<!-- 热门搜索 -->
|
|
<view class="popular" wx:if="{{hotInfo}}">
|
|
<view class="recent_top">
|
|
<text>热门搜索</text>
|
|
</view>
|
|
<block wx:for="{{hotInfo}}" wx:key="index">
|
|
<view class="popular_conten" catchtap="tapUrl" data-item="{{item}}">
|
|
<view class="popular_left">
|
|
<image src="{{item.img_url}}"></image>
|
|
</view>
|
|
<view class="popular_right">
|
|
<view class="title">{{item.title}}</view>
|
|
<view class="detail">{{item.subtitle}}</view>
|
|
</view>
|
|
</view>
|
|
</block>
|
|
</view>
|
|
</view>
|
|
</view> |