search.wxml 2.9 KB

1
  1. <view class="app-layout data-v-4f2397a8" style="{{'background:'+(isSearch?'#f7f7f7':'#ffffff')+';'}}"><app-layout vue-id="50cad900-1" class="data-v-4f2397a8" bind:__l="__l" vue-slots="{{['default']}}"><view class="search data-v-4f2397a8"><view class="top data-v-4f2397a8"><view class="dir-left-nowrap box data-v-4f2397a8"><input class="box-grow-1 input data-v-4f2397a8" type="text" confirm-type="搜索" data-event-opts="{{[['confirm',[['search',['$event']]]],['input',[['__set_model',['','keyword','$event',[]]]]]]}}" value="{{keyword}}" bindconfirm="__e" bindinput="__e"/><block wx:if="{{keyword}}"><image class="search-close data-v-4f2397a8" src="/static/image/icon/delete-yuan.png" data-event-opts="{{[['tap',[['clear',['$event']]]]]}}" bindtap="__e"></image></block><view data-event-opts="{{[['tap',[['search',['$event']]]]]}}" class="box-grow-0 cross-center data-v-4f2397a8" bindtap="__e">搜索</view></view><block wx:if="{{searchList.length>1}}"><view class="radio dir-left-nowrap data-v-4f2397a8"><block wx:for="{{searchList}}" wx:for-item="item" wx:for-index="index" wx:key="index"><view data-event-opts="{{[['tap',[['switchSearch',['$0'],[[['searchList','',index,'key']]]]]]]}}" class="box-grow-1 main-center data-v-4f2397a8" bindtap="__e"><view class="{{['radio-item data-v-4f2397a8',item.key===searchKey?theme+'-color '+theme+'-border '+'active':'']}}">{{item.name+''}}</view></view></block></view></block></view><block wx:if="{{!isSearch&&historyList.length>0}}"><view class="history data-v-4f2397a8"><view class="dir-left-nowrap cross-center title data-v-4f2397a8"><view class="box-grow-1 data-v-4f2397a8">历史搜索</view><image class="box-grow-0 data-v-4f2397a8" src="../../static/image/icon/delete.png" data-event-opts="{{[['tap',[['deleteHistory',['$event']]]]]}}" bindtap="__e"></image></view><view class="dir-left-wrap list data-v-4f2397a8"><block wx:for="{{historyList}}" wx:for-item="item" wx:for-index="index" wx:key="index"><view data-event-opts="{{[['tap',[['historyClick',['$0'],[[['historyList','',index,'keyword']]]]]]]}}" class="box-grow-0 cross-center item data-v-4f2397a8" bindtap="__e">{{item.keyword+''}}</view></block></view></view></block><block wx:if="{{isSearch}}"><view class="goods-list data-v-4f2397a8"><block wx:if="{{list.length<=0}}"><view class="main-center no-result data-v-4f2397a8"><view class="dir-left-nowrap cross-center data-v-4f2397a8"><image class="box-grow-0 empty data-v-4f2397a8" src="../../static/image/icon/empty.png"></image><view class="box-grow-1 data-v-4f2397a8"><view class="data-v-4f2397a8">抱歉,没有相关商品</view><block wx:if="{{!mch_id}}"><view class="text data-v-4f2397a8">以下是为您推荐的商品</view></block></view></view></view></block><view style="background-color:#f7f7f7;" class="data-v-4f2397a8"><app-goods-list vue-id="{{('50cad900-2')+','+('50cad900-1')}}" list="{{newList}}" class="data-v-4f2397a8" bind:__l="__l"></app-goods-list></view></view></block></view></app-layout></view>