| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950 |
- <!--为搜索页面-->
- <view class="search" style="background-color:#ffffff;">
- <view class="search-inside secondary-background-color" style="display: flex; align-items: center;">
- <icon type="search" size="20"></icon>
- <input class="search-input" 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" bindtap="cancel">取消</view>
- </view>
- <scroll-view class="hot-block" scroll-y>
- <view class="hot-tag-block">
- <view class="hot-tag-title primary-text-color">历史搜索</view>
- <view class="hot-tags secondary-text-color">
- <view class="hot-tag" wx:for="{{searchHistory}}" wx:for-item="keyword" wx:key="*this"
- data-search-tag="{{keyword}}" bindtap="searchTag">{{keyword}}</view>
- </view>
- </view>
- <view class="hot-tag-block">
- <view class="hot-tag-title primary-text-color">热门搜索</view>
- <view class="hot-tags secondary-text-color">
- <view class="hot-tag" wx:for="{{hotTagData}}" wx:for-item="item" wx:key="tag" data-search-tag="{{item.tag}}"
- bindtap="searchTag">{{item.tag}}</view>
- </view>
- </view>
- <view class="hot-bar-block">
- <text class="hot-bar-title primary-background-color white-text-color">实时热点</text>
- <view class="hot-bar" wx:for="{{hotBarData}}" wx:key="rank" wx:for-item="item" wx:key="_id"
- data-activity-id="{{item._id}}" bindtap="viewActivity">
- <view>
- <text class="primary-text-color" space="nbsp">{{item.rank}}{{" "}}{{" "}}{{" "}}</text><text
- class="secondary-text-color">{{item.title}}</text>
- </view>
- <image class="more" src="/images/more.png" mode="aspectFill"></image>
- </view>
- </view>
- </scroll-view>
- <scroll-view wx:if="{{searchEnable}}" class="search-block secondary-background-color" scroll-y bindtap="blur">
- <view class="result-bar" wx:for="{{searchResult}}" wx:for-item="msg" wx:key="_id">
- <itemCard item="{{msg}}" />
- </view>
- <view wx:if="{{searchText == '' && searchResult.length == 0}}" wx:for="{{searchHistory}}" wx:for-item="keyword"
- wx:key="*this" class="search-history" data-history="{{keyword}}" catchtap="searchAgain">
- <view>{{keyword}}</view>
- <view data-history="{{keyword}}" catchtap="removeHistory">×</view>
- </view>
- </scroll-view>
|