You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
1 line
2.9 KiB
1 line
2.9 KiB
1 year ago
|
<view class="wanl-search"><view class="cu-custom" style="{{'height:'+($root.g0.height+'px')+';'}}"><view class="cu-bar fixed" style="{{'height:'+($root.g1.height+'px')+';'+('padding-top:'+($root.g2.top+'px')+';')}}"><view data-event-opts="{{[['tap',[['e0',['$event']]]]]}}" class="action" bindtap="__e"><text class="wlIcon-fanhui1"></text></view><view class="search-form round"><text class="wlIcon-sousuo1 text-bold"></text><input type="text" maxlength="12" confirm-type="search" placeholder-style="color: #ccc" placeholder="{{searchKeywords?searchKeywords:'搜索 '+searchTypeText[searchType]}}" focus="{{true}}" data-event-opts="{{[['confirm',[['onSearchInputConfirmed',['$event']]]],['input',[['onSearchInputChanged',['$event']]]]]}}" bindconfirm="__e" bindinput="__e"/></view></view></view><block wx:if="{{isHistory}}"><view class="history padding-lr"><block wx:if="{{$root.g3>0}}"><view><view class="title"><text>历史搜索</text><text data-event-opts="{{[['tap',[['removeHistory',['$event']]]]]}}" class="wlIcon-lajitong" bindtap="__e"></text></view><view class="list"><block wx:for="{{historyList}}" wx:for-item="item" wx:for-index="index" wx:key="keywords"><view data-event-opts="{{[['tap',[['keywordsToList',['$0'],[[['historyList','keywords',item.keywords,'keywords']]]]]]]}}" bindtap="__e">{{item.keywords}}</view></block></view></view></block><view><view class="title"><text>热门搜索</text><text class="wlIcon-guanzhu"></text></view><view class="list"><block wx:for="{{searchList}}" wx:for-item="item" wx:for-index="index" wx:key="id"><block><block wx:if="{{item.flag=='hot'}}"><view data-event-opts="{{[['tap',[['keywordsToList',['$0'],[[['searchList','id',item.id,'keywords']]]]]]]}}" class="action" bindtap="__e"><text>{{item.keywords}}</text><text class="cu-tag badge">hot</text></view></block><block wx:else><view data-event-opts="{{[['tap',[['keywordsToList',['$0'],[[['searchList','id',item.id,'keywords']]]]]]]}}" bindtap="__e"><text>{{item.keywords}}</text></view></block></block></block></view></view></view></block><block wx:else><view class="cu-list menu"><block wx:for="{{search.searchList}}" wx:for-item="item" wx:for-index="index" wx:key="keywords"><view class="cu-item"><view data-event-opts="{{[['tap',[['keywordsToList',['$0'],[[['search.searchList','keywords',item.keywords,'keywords']]]]]]]}}" class="content" bindtap="__e"><text class="text-sm">{{item.keywords}}</text></view></view></block><block wx:for="{{search.categoryList}}" wx:for-item="item" wx:for-index="index" wx:key="id"><block wx:if="{{searchType!=='find'}}"><view data-event-opts="{{[['tap',[['categoryToList',['$0','$1'],[[['search.categoryList','id',item.id,'id']],[['search.categoryList','id',item.id,'name']]]]]]]}}" class="cu-item arrow" bindtap="__e"><view class="content"><text class="text-sm text-gray">{{item.name}}</text></view><view class="action"><view class="cu-tag round bg-orange light">{{item.name+"类目"}}</view></view></view></block></block></view></block></view>
|