goods_search.wxml 7.5 KB

1
  1. <view class="{{['search-container','data-v-f23cf1fc',themeName]}}"><u-sticky vue-id="1e7533c0-1" offset-top="0" h5-nav-height="0" class="data-v-f23cf1fc" bind:__l="__l" vue-slots="{{['default']}}"><view class="search-input data-v-f23cf1fc"><u-search class="flex-1 data-v-f23cf1fc" vue-id="{{('1e7533c0-2')+','+('1e7533c0-1')}}" height="72" bg-color="#F4F4F4" show-action="{{false}}" placeholder="请输入要搜索的商品" focus="{{!searchStatus}}" value="{{search.name}}" data-event-opts="{{[['^focus',[['focusSearch']]],['^search',[['handleSearch']]],['^input',[['__set_model',['$0','name','$event',[]],['search']]]]]}}" bind:focus="__e" bind:search="__e" bind:input="__e" bind:__l="__l"></u-search><view data-event-opts="{{[['tap',[['handleSearch',['$0'],['search.name']]]]]}}" class="search-action data-v-f23cf1fc" bindtap="__e">搜索</view></view></u-sticky><view hidden="{{!(!searchStatus)}}" class="search-options-container data-v-f23cf1fc"><view class="search-options data-v-f23cf1fc"><view class="search-options-header data-v-f23cf1fc"><text class="data-v-f23cf1fc">历史搜索</text><u-icon vue-id="1e7533c0-3" name="trash" data-event-opts="{{[['^tap',[['onSearchHistoryClear']]]]}}" bind:tap="__e" class="data-v-f23cf1fc" bind:__l="__l"></u-icon></view><view class="flex row-center data-v-f23cf1fc"><u-loading vue-id="1e7533c0-4" mode="circle" show="{{goodsSearchHistoryLoading}}" class="data-v-f23cf1fc" bind:__l="__l"></u-loading></view><block wx:if="{{!goodsSearchHistoryLoading}}"><block wx:if="{{$root.g0}}"><view class="search-options-main data-v-f23cf1fc"><block wx:for="{{goodsSearchHistory}}" wx:for-item="item" wx:for-index="index" wx:key="index"><view data-event-opts="{{[['tap',[['handleSearch',['$0'],[[['goodsSearchHistory','',index]]]]]]]}}" class="search-options-item data-v-f23cf1fc" bindtap="__e">{{item}}</view></block></view></block><block wx:else><view class="flex row-center muted data-v-f23cf1fc">暂无记录</view></block></block></view></view><view hidden="{{!(searchStatus)}}" class="data-v-f23cf1fc"><view class="sort data-v-f23cf1fc"><view data-event-opts="{{[['tap',[['handSortOptions',['all']]]]]}}" class="{{['data-v-f23cf1fc','sort-item',[(!search.price&&!search.sale)?'sort-item--active':'']]}}" bindtap="__e"><text class="data-v-f23cf1fc">综合</text></view><view data-event-opts="{{[['tap',[['handSortOptions',['price']]]]]}}" class="{{['data-v-f23cf1fc','sort-item',[(search.price)?'sort-item--active':'']]}}" bindtap="__e"><text class="data-v-f23cf1fc">价格</text><sort-icon class="m-l-10 data-v-f23cf1fc" vue-id="1e7533c0-5" status="{{search.price}}" active-color="{{themeColor}}" bind:__l="__l"></sort-icon></view><view data-event-opts="{{[['tap',[['handSortOptions',['sale']]]]]}}" class="{{['data-v-f23cf1fc','sort-item',[(search.sale)?'sort-item--active':'']]}}" bindtap="__e"><text class="data-v-f23cf1fc">销量</text><sort-icon class="m-l-10 data-v-f23cf1fc" vue-id="1e7533c0-6" status="{{search.sale}}" active-color="{{themeColor}}" bind:__l="__l"></sort-icon></view><view class="search-action data-v-f23cf1fc"><view data-event-opts="{{[['tap',[['e0',['$event']]]]]}}" hidden="{{!(goodsCardStyle==='rectangle')}}" bindtap="__e" class="data-v-f23cf1fc"><u-icon vue-id="1e7533c0-7" name="grid" size="38" class="data-v-f23cf1fc" bind:__l="__l"></u-icon></view><view data-event-opts="{{[['tap',[['e1',['$event']]]]]}}" hidden="{{!(goodsCardStyle==='square')}}" bindtap="__e" class="data-v-f23cf1fc"><u-icon vue-id="1e7533c0-8" name="list-dot" size="38" class="data-v-f23cf1fc" bind:__l="__l"></u-icon></view></view><view data-event-opts="{{[['tap',[['e2',['$event']]]]]}}" class="{{['data-v-f23cf1fc','sort-item',[(search.sale)?'sort-item--active':'']]}}" bindtap="__e"><text class="data-v-f23cf1fc">筛选</text></view></view><mescroll-body vue-id="1e7533c0-9" up="{{$root.a0}}" data-ref="mescrollRef" data-event-opts="{{[['^init',[['mescrollInit']]],['^down',[['downCallback']]],['^up',[['upCallback']]]]}}" bind:init="__e" bind:down="__e" bind:up="__e" class="data-v-f23cf1fc vue-ref" bind:__l="__l" vue-slots="{{['default']}}"><view class="{{['data-v-f23cf1fc','goods-container','goods-container-'+goodsCardStyle]}}"><block wx:for="{{goodsList}}" wx:for-item="item" wx:for-index="__i0__" wx:key="id"><goods-card class="goods-item data-v-f23cf1fc" vue-id="{{('1e7533c0-10-'+__i0__)+','+('1e7533c0-9')}}" shape="{{goodsCardStyle}}" name="{{item.name}}" image="{{item.image}}" price="{{item.sell_price}}" minPrice="{{item.lineation_price}}" data-event-opts="{{[['tap',[['goGoodsDetail',['$0'],[[['goodsList','id',item.id,'id']]]]]]]}}" bindtap="__e" bind:__l="__l"></goods-card></block></view></mescroll-body></view><u-popup bind:input="__e" class="screen-popup data-v-f23cf1fc" vue-id="1e7533c0-11" mode="bottom" border-radius="{{30}}" safe-area-inset-bottom="{{true}}" value="{{showScreen}}" data-event-opts="{{[['^input',[['__set_model',['','showScreen','$event',[]]]]]]}}" bind:__l="__l" vue-slots="{{['default']}}"><view class="flex-col data-v-f23cf1fc" style="height:100%;"><view class="bold text-center lg p-20 data-v-f23cf1fc">筛选</view><view class="screen-content data-v-f23cf1fc"><scroll-view style="height:800rpx;" scroll-y="true" class="data-v-f23cf1fc"><view class="screen-item data-v-f23cf1fc"><view class="bold data-v-f23cf1fc">会员价</view><view class="brand-list flex flex-wrap m-t-30 data-v-f23cf1fc"><block wx:for="{{vipLists}}" wx:for-item="item" wx:for-index="__i1__" wx:key="*this"><view data-event-opts="{{[['tap',[['handlemenber',['$0'],[[['vipLists','',__i1__,'value']]]]]]]}}" class="{{['brand-item','m-b-20','line-1','data-v-f23cf1fc',(item.value===search.is_member_price)?'active':'']}}" bindtap="__e">{{''+item.name+''}}</view></block></view></view><view class="screen-item data-v-f23cf1fc"><view class="bold data-v-f23cf1fc">价格区间</view><view class="brand-list flex flex-wrap m-t-30 data-v-f23cf1fc"><view class="price-item m-b-20 line-1 data-v-f23cf1fc"><u-input bind:input="__e" vue-id="{{('1e7533c0-12')+','+('1e7533c0-11')}}" input-align="center" type="number" placeholder="最低价" clearable="{{false}}" value="{{search.min_price}}" data-event-opts="{{[['^input',[['__set_model',['$0','min_price','$event',[]],['search']]]]]}}" class="data-v-f23cf1fc" bind:__l="__l"></u-input></view><view class="m-b-20 m-r-20 m-l-20 data-v-f23cf1fc">——</view><view class="price-item m-b-20 line-1 data-v-f23cf1fc"><u-input bind:input="__e" vue-id="{{('1e7533c0-13')+','+('1e7533c0-11')}}" input-align="center" type="number" placeholder="最高价" clearable="{{false}}" value="{{search.max_price}}" data-event-opts="{{[['^input',[['__set_model',['$0','max_price','$event',[]],['search']]]]]}}" class="data-v-f23cf1fc" bind:__l="__l"></u-input></view></view></view><view class="screen-item data-v-f23cf1fc"><view class="bold data-v-f23cf1fc">品牌</view><view class="brand-list flex flex-wrap m-t-30 data-v-f23cf1fc"><block wx:for="{{brandLists}}" wx:for-item="item" wx:for-index="index" wx:key="index"><view data-event-opts="{{[['tap',[['handleScreen',['$0'],[[['brandLists','',index]]]]]]]}}" class="{{['brand-item','m-b-20','line-1','data-v-f23cf1fc',(item.id==search.brand_id)?'active':'']}}" bindtap="__e">{{''+item.name+''}}</view></block></view></view></scroll-view></view><view class="screen-footer flex-1 flex data-v-f23cf1fc"><button class="btn btn--reset data-v-f23cf1fc" hover-class="none" size="md" data-event-opts="{{[['tap',[['handleReset',['$event']]]]]}}" bindtap="__e">重置</button><button class="btn btn--confirm data-v-f23cf1fc" hover-class="none" size="md" data-event-opts="{{[['tap',[['handleConfirm',['$event']]]]]}}" bindtap="__e">确定</button></view></view></u-popup></view>