| 1234567891011121314151617181920212223242526272829303132 |
- <!--为搜索页面-->
- <view class="search block-background-color">
- <view class="search-inside" style="display: flex; align-items: center;">
- <icon type="search"></icon>
- <input class="search-input primary-text-color" style="width: {{searchEnable ? 550 : 650}}rpx;" value="{{searchText}}" placeholder="搜索" confirm-type="search" bindinput="update" bindfocus="focus" bindconfirm="search"></input>
- </view>
- <view wx:if="{{searchEnable}}" class="cancel-button secondary-text-color" bindtap="cancel">取消</view>
- </view>
- <scroll-view class="hot-block" scroll-y="true">
- <view class="hot-tag-block block-background-color">
- <view class="hot-tag-title default-primary-color-font">热门搜索</view>
- <view class="hot-tags">
- <view class="hot-tag light-primary-color" wx:for="{{hotTagData}}" wx:key="tag" wx:for-item="item" data-search-tag="{{item.tag}}" bindtap="searchTag">{{item.tag}}</view>
- </view>
- </view>
- <view class="hot-bar-block">
- <view class="hot-bar-title default-primary-color-font">实时热点</view>
- <view class="hot-bar block-background-color" wx:for="{{hotBarData}}" wx:key="rank" wx:for-item="item" data-activity-id="{{item.id}}" bindtap="viewActivity">{{item.rank}}. {{item.title}}</view>
- </view>
- </scroll-view>
- <scroll-view wx:if="{{searchEnable}}" class="search-block" scroll-y="true" bindtap="blur">
- <view class="result-bar" wx:for="{{searchResult}}" wx:key="_id">
- <itemCard item="{{item}}"/>
- </view>
- <view wx:if="{{searchText == '' && searchResult.length == 0}}" wx:for="{{searchHistory}}" wx:for-item="item" wx:key="*this" class="search-history" data-history="{{item}}" catchtap="searchAgain">
- <view>{{item}}</view>
- <view data-history="{{item}}" catchtap="removeHistory">×</view>
- </view>
- </scroll-view>
|